Close a parent issue when all linked issues with a certain linked type are closed

Simon Wong August 19, 2019

Our current implementation:

A Problem ticket has multiple linked issues, some are "dependent on" types and some are "related to" types.  Our process dictates that a Problem ticket can be closed when all "dependent on" type tasks are closed (there's always multiple 'dependent on' tasks per Problem ticket). 

Is it possible to use the Automation plugin to trigger a transition (Complete) when all "dependent on" type linked tasks are closed?  

I'm thinking something like the following logic:

  1. When an issue is closed, check to see if there's a parent issue linked to it with the "dependent on" link type.
  2. If yes, see if that parent is linked to any other issues with the same "dependent on" link type that is still unresolved.
    1. If yes, take no action
    2. If no, close parent issue. 

Thanks in advance for any advice. 

2 answers

2 votes
Deleted user August 19, 2019

Hello Simon, 

Thank you for reaching us. 

Yes, it is possible!

Let me show how:

  • First of all, you need to use the branch to access the all linked issue ("parent").
  • After you'll need to use the related issues condition for access all linked issues in the "parent".
  • If all "child" issues with type "relates to" and "blocked by"matches with the status "Done" it will transition the "parent" issue for done as well.

close parent issue.png

Can you please give it a try with the rule above and let me know how it goes?

Cheers, 

Cristiano

0 votes
Simon Wong August 23, 2019

Hi Cristiano, 

 

Thanks for your reply!

Looking at the configuration, it seems like it's looking at a closed issue, query its parent, and if a parent is of a certain status, then close the parent.  Do I have that correct?  If so, that's not exactly what I'm trying to do.  Let me see if I can clarify. 

  1. When an issue (let's call this issue123) is closed, identify its parent (let's call this issue999) where the relationship is "issue999 is dependent on issue123" and "issue123 is a predecessor of issue999"
  2. If ALL of the parent (issue999) issue's dependent tasks have the DONE status, then close the parent (issue999).
  3. If one or more of the dependent tasks is still open, do nothing.

Hope that makes sense.

------------------------------

I went ahead and implemented what you recommended, as shown below:

image.png

I then created some test issues to test out this automation, but it did not close the parent ticket.  You'll see bellow that the 2 dependent tasks are all closed, but the parent issue stayed open. 

 

image.png

 

Any additional recommendation would be greatly appreciated.  Thank you. 

Simon Wong August 27, 2019

Any other recommendations?  Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events