Forums

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

Close issues when a link is added to them of the type 'Duplicates'

Hadas August 1, 2022

I wish to close issues when they are set as 'Duplicates' of another issue. The problem is that many times this is done by setting the other issue link as 'Duplicated by' and not by editing the specific issue itself.

I've created an automation triggered when an issue is edited and used a branch for finding all other issues which are marked as 'Duplicates' however for some reason it does not work.

It did work when I tried the reverse direction.

So is there a way to trigger the rule on the 'other issue' since in a way it was edited.

 

To summarize: What I want is that when I link two issues as 'Duplication' the one that is set to 'Duplicates' the other will be closed.

2 answers

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
August 1, 2022

Hello @Hadas 

Can you show us the details of the rule you created? It is difficult for us to suggest how to fix it or debug why it is not working without those details.

Hadas August 1, 2022

Screen Shot 2022-08-01 at 18.50.40.png

Trudy Claspill
Community Champion
August 1, 2022

The rule you need can be found in the Automation Library. It is called Close Duplicate Issues.

Whether you select "duplicates" or select "is duplicated by" when you create the link, the issue in the linking that gets the "duplicates" setting is the one that gets closed.

Screen Shot 2022-08-01 at 10.10.26 AM.png

Like Bill Sheboy likes this
Hadas August 1, 2022

Where does it says in the rule that the issue with the "duplicates" is the one that is closed?

Hadas August 1, 2022

I does work but I can see where it dictates which of the issue is closed. Can you explain?

Trudy Claspill
Community Champion
August 1, 2022

I can't point to where it says that. I tested it in my own system and it worked.

These are the link types I have.

Screen Shot 2022-08-01 at 12.58.44 PM.png

With the rule I previously posted I tried two scenarios:

1. In issue A add a link to issue B and choose "duplicates" (A duplicates B). Issue A is the one that was transitioned to done.

2. In issue C add a link to issue D and choose "is duplicated by" (C is duplicated by D). Issue D is the one that is transitioned to done.

 

Experimenting with the rule by changing the link type used, what I find is that the issue that has the Outward Description part of the link is the one against which the Action gets applied.

Hadas August 1, 2022

Wow, Thanks. So I'll try to remember that the outward one is the one that is closed (or any other action set) although it does not say that anywhere in the rule.

So weird.

Trudy Claspill
Community Champion
March 13, 2023

It is sort of explained in the description of the Issue Linked trigger.

Issue linked
Rule executes when an issue is linked to another issue. {{issue}} will always refer to the source issue, so if ISSUE-A is blocked by ISSUE-B, this rule will execute on ISSUE-B. To access ISSUE-A, use {{destinationIssue}}, and to access the link type, use {{linkType}} (e.g. {{linkType}}
0 votes
Sebastian Pechhold
Contributor
March 10, 2023

Hi, i have a problem.

I want to close a newer issue (issue B) that is linked to an existing issue (issue A) with "duplicates" or "is duplicated by" (i don't get the difference).

What i do:

  1. open issue B
  2. link it to issue A with "duplicates" or "is duplicated by"
  3. Issue A gets closed (but i want issue B to be closed)

 

What i tried:

Screenshot 2023-03-10 at 09.01.00.pngScreenshot 2023-03-10 at 09.08.52.pngScreenshot 2023-03-10 at 09.08.45.png

Trudy Claspill
Community Champion
March 10, 2023

Hello @Sebastian Pechhold 

This post already has an Accepted Answer. Please start a new Question for your request for assistance, as it appears you need some guidance on understanding the Duplicate link type as well as the automation around modifying linked issues.

<edit>

I see now that you did already create a new question, before I posted the above response. 

https://community.atlassian.com/t5/Jira-Software-questions/Automation-Linking-and-transitioning-duplicates-not-working/qaq-p/2295296

Suggest an answer

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

Atlassian Community Events