Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I create automation exception rules for cloning issue types

Gary Pallas August 29, 2024

I'm trying to work out how to refine the existing (built in) cloning function for a particular issue type to effectively restrict some fields from being populated to the newly cloned record.  

Example - cloning a change request include all fields apart from planned start and end date.  

I guess my main challenge here is trying to find the appropriate method of restricting the automation trigger to only apply when issue is created via 'clone' rather than manual creation of new issue.  From here I can apply the logic but I can't seem to figure out how to define this particular trigger scenario.  

Feels like it will be very obvious but any help would be appreciated.  

Thank you

3 answers

1 vote
Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 29, 2024

Hi @Gary Pallas,  welcome to Atlassian Community. 

When you clone an issue it will allways create an issue link to the source issue, hence you shold be able to use an automation rule with a Created trigger, and then add a filter looking for the Clones link type. 

This will not work using an Edited trigger since the link might have been removed by a user. But when the issue is created the link exists, and can be used as a filter for further processing in the automation rule. 

Below the filter within you rule you can then set or remove values from all wanted fields. 

TimK

 

Gary Pallas August 29, 2024

Hi Tim

This sounds promising and exactly the sort of association I was looking for to 'hook into'  as the trigger for any honing of clone rules - thanks Tim - I'll give this a go.  Appreciate the insight

Like Tim Kopperud likes this
Gary Pallas August 29, 2024

Struggling a little.  It would seem that the clones link type doesn't exist. 

To check this further  I've tried to use this as a basis in a filter (including 'issueLinkType = clones' into the query) and nothing returns despite there being cloned issues within the wider parameters. 

Is this the correct linkage I am looking for?

Adolfo Casari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 29, 2024

@Gary PallasTry using the Refetch action to make sure the link actually exists after the Issue Created event.

Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 29, 2024

@Gary Pallas, I created a test rule looking like this:

image.png

After I cloned a test issue, the audit log shows this::

image.png

Have you tried a setup like the example above? 

The correct JQL for finding this manually is

issue in linkedIssues(MOBL-57, Clones)

So, using this in an automation by JQL should be

issue in linkedIssues({{issue}}, Clones)

 

See JQL functions | Jira Cloud | Atlassian Support for detals on syntax. Also notice linedIssue vs linkedIssues(). Use the latter in your scenario since the first doesn't utilize the linke type. 

But you don't need JQL in the rule as shown in the example rule above.

TimK 

Gary Pallas September 2, 2024

Thanks again Tim - yes I tried exactly that rule from your screenshot above and I don't appear to have an option for 'clones' within Link Types drop down.  Was this a relationship type that was configured as a pre-cursor?  Or was this out of the box?  I can look to the JQL as another idea so again thanks for sharing that - appreciated. 

Gary Pallas September 2, 2024

There are a few additional options here but clones is not one of them

Rule Builder.JPG

Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 5, 2024

Hi @Gary Pallas , I suspect the Cloners link type has been renamed or removed from the Issue linking settings.

Please have a look at this KB article  Cloned ticket is not linked to the Parent | Jira | Atlassian Documentation

Are you able to try "restoring" the Cloners link type as described in the article? 

TimK

Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 8, 2024

Hi @Gary Pallas where you able to in the end solve this, based on the replies provided within this thread? If so it might be helpfull for other users, searching for the same problem, if you mark the answer as accepted. 

TimK

0 votes
Luka Hummel - codefortynine
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 30, 2024

Hi @Gary Pallas

If you are having trouble achieving your goal with Jira Automations, you could try our app Deep Clone for Jira. Deep Clone allows you to clone issues and make changes to the data that is being cloned. You can use the Field Editor feature to edit field values or clear them.

2024-08-30 14-37.png

0 votes
Tomasz Kowalczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 29, 2024

When you're doing cloning action try to set planned start and end to empty value

Gary Pallas August 29, 2024

Thanks Tomasz - yes this is exactly my thought process for this field  - it was the trigger for identifying new issues created by 'cloning' that I was most struggling with.  Appreciate your help

Like Tim Kopperud likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events