Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I this possible to restrict the duplicate linking by automation rule

V N Raju Raju
Contributor
August 21, 2023

Have to restrict the duplicate issue linking, If the child issue type has the value in a particular field (This field value got from a previously linked parent ticket). I wrote an automation rule for this and it deleted the previously existing issue link also. Please help me with this.

1 answer

0 votes
Bill Sheboy
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 21, 2023

Hi @V N Raju Raju 

For a question like this, please post images of your complete automation rule, including details of all actions / conditions, and of the audit log details showing the rule execution.  Those will provide context for the community to offer suggestions.

Until we see those...

Automation rules run (i.e., trigger) after something happens.  They do not restrict issue changes, although they can undo/reverse them (e.g., delete a duplicate link).  You may want to investigate if there are workflow validators possible to do what you ask.

Kind regards,
Bill

V N Raju Raju
Contributor
August 22, 2023

Hi @Bill Sheboy

 

below attachments are the automation rule-related screenshots.  This automation rule deletes the previously existing issue link also. My requirement is to restrict the duplicate linking or delete the triggered duplicate linkUnlink 1.JPGUnlink 2.JPGUnlink 3.JPG

Bill Sheboy
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 22, 2023

Thanks for that information.  Please clarify: what is not working as you expect, as the rule seems to have removed the link?

V N Raju Raju
Contributor
August 22, 2023

Hi @Bill Sheboy 

 

This rule deleted all "is part of" type issue links. My requirement is not to remove every first linked ticket.

For example, the first time I linked the ST-286 and ST-285 with the "is part of" link. At that time I got the Fix versions field value in  ST-286. Later I linked ST-286 and ST-290 with the same "is part of" link. 

In this case, this rule has to delete the second time link only (between ST-286 and ST-290). 

Bill Sheboy
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 22, 2023

How is the issue linking happening: manually, from another rule, something else?  Knowing that may help to isolate the linking.

V N Raju Raju
Contributor
August 22, 2023

It's linking by two types first one is manual linking and the second one is If I provide the Fix versions field value in the source ticket, It will be linked to Fix version-related issue.

Bill Sheboy
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 24, 2023

How does the second link get added: with an automation rule, manually, or something else?  If it is with an automation rule, you could check if the link is already present to avoid adding the duplicate.

V N Raju Raju
Contributor
August 24, 2023

Hi @Bill Sheboy 

 

There are two ways to link the issues first one is by manual. In a second way if I enter the Fix version field value in the child ticket it's linked to the corresponding Fix versions parent issue by automation.

Bill Sheboy
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 24, 2023

I believe this takes us back to your original idea, of deleting just one of the links.

I wonder if it would be possible to, after detecting there are duplicate links, use the advanced edit with JSON to remove the link using its id value, rather than the link-type: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/  Perhaps try experimenting with that.

V N Raju Raju
Contributor
August 24, 2023

Hi @Bill Sheboy 

 

I have tried this automation by using a web request and it throws the attached error.Issue Unlink.JPGIssue Unlink 1.JPG

Bill Sheboy
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 24, 2023

I confirmed your results that the JSON edit with the rule action is using a function which can only add and copy.  Here are a couple of other approaches to try:

V N Raju Raju
Contributor
August 31, 2023

Thanks @Bill Sheboy 

 

Now I got the resolution

Like Bill Sheboy 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