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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,020
Community Members
 
Community Events
176
Community Groups

Automation close parent issue

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 Apr 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

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

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

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 May 02, 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

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 May 03, 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

Atlassian Community Events