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

Automation close parent issue

Urmo Luts April 27, 2022

Hi

I have project where i have main issue. When user click IN PROGRESS then there is one sub-task and 2 another ticket into another Jira project. Relates to issue link between main ticket and another project tickets.

Now when Relates to and sub-task status is Closed, how i should write automation what close main ticket also?

WHEN Issue transitioned to Closed
IF Issue Type equals Sub-task
For Parent
IF Sub-task match status = closed

Then Transition the issue to Closed

but how i should add relates to issues into this ?

1 answer

1 accepted

0 votes
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2022

Hi @Urmo Luts ,

As far as I understand your requirement this needs to be scoped from 2 sides. Let´s wrap this up a little bit:

2 projects:

  • project A
    • Task 1
      • Subtask 1.1
      • Subtask 1.2
  • project B
    • Task 2 --> relates to Task 1 (in project A)

 

So from my point of view the use case you described has 2 entry points:

  1. given: subtask of Task 1 is closed
    1. when all other subtasks of Task 1 are closed (needs to be checked)
    2. and when Task 2 in project B (that is linked to Task A) is closed (needs to be checked)
      1. then transistion Task A to closed
  2. given: Task 2 in project B is closed
    1. when all subtask of Task A (that is linked with relates to) are closed
      1. then: transition Task A to closed

 

Does this describe your use case and also an idea of your automation rule(s) ?

Looking forward to your feedback.

 

Best
Stefan

Urmo Luts April 29, 2022

Hi

Seems to be that right now is working when last closing issue is sub-task. But when another issue from Project Kommunikatsioon or Kasutajatugi, then it does not work.

I have sub-task + two another jira project and they have different closing status (Done, Resolved, Closed).

Yes i know there is today too much status what do same thing but i'm working to close up this old solution.

image.pngwith best

Urmo

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 29, 2022

Hi @Urmo Luts ,

As I mentioned splitting this use case into 2 different rules would make it easier and doesn´t really need for checking projects as the main condition is the status of wheter subtasks or linked issues.

Your use case obviously has 2 different triggers and for each trigger it´s necessary to check different conditions. Therefore i would suggest to create 2 different rules.

Best
Stefan

Urmo Luts May 2, 2022

Hi @Stefan Salzl

I made one long automation into two. Seems to be that sub-task close work fine but this when sub-task's are closed but relates to tickets are opened but after last relatest tickets closed it does not close.

image.png

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 2, 2022

Hi @Urmo Luts 

I tried to reproduce what I got from your description:

Rule 1 - trigger is transition from linked issue (relates to) to done

image.png

 

Rule 2 - triggers when subtask is transitioned to done (then checks if other subtasks exist and all are done and if related issue exists and is done)

image.png

 

This is the most simple version of the described requirement. Issue types and status needs to be set according to your configuration.

Best
Stefan

Urmo Luts May 3, 2022

Hi

Seems to be that it allmost works but i think i had made some error into.

Right now is one relates to is closed/resolved/done, then parent issue is closed also.

image.png

image.png

Seems to be that i have done something wrong...

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 3, 2022

mhm....got it.

Within the branch (where you change context of the automation rule to the issue that should be closed) add a condition that checks if there are other linked issues with status "not closed" (like the other rule is checking for other open subtasks).

Could look like similar to following:

image.png

Best
Stefan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events