I have a sub-task that is triggered off of a sub-task workflow. Once this sub-task is moved to Done, I would like the post-function to transition the main parent ticket to done.
It looks like this:
New Item Request -> Triggers Item Set-up sub-task -> Triggers Attribution Sub-task - >Triggers Item Audit sub-task
When Item Audit moves to done, I would like the New Item Request parent ticket to move to Done. I tried to use the built-in auto transition parent issue script but it failed (im thinking this is because it was trying to move Attribution to done?)
You will need to ensure that Parent issue's WF status has a path to be moved into "Done" status. Otherwise, you will not be able to triggered the parent issue's status to "Done" via automation or ScriptRunner post function codes.
Hope this helps.
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Infrastructure Applications Team
the screenshot you have posted looks like it is from Script Runner. Just for a clarification: are you going the Script Runner route or do you use Jira Automation?
Did I understand it correctly the hierarchy is as follows?
New Item Request ("Main-"Issue)
|----> Item Set-up (Sub-Task)
|----> Attribution (Sub-Task)
|----> Item Audit (Sub-Task)
In case Item Audit transitions to "Done" the "New Item Request" is moved to done. Is this correct?
But what will happen with the status of "Attribution" and "Item Set-up" Sub-Task? There is a possibility in this scenario that they will be left with "Open" status and overseen (probably) because the "Main-"Issue is already in "Done" status.
Am I missing a point?
Thanks for your response! The Attribution won't trigger until Item Setup moves to "Done" and Item Audit won't trigger until Attribution moves to "Done". So all sub-tasks would be done by the time item audit is complete, but the issue is the parent ticket stays open when Item Audit moves to done. It is scriptrunner. Hope this helps to clarify & I really appreciate your support!
I am positive this can be achieved using Script Runner along with the Built-in Script "Transition parent when all sub tasks are resolved" it provides:
Edit: linked the appropriate documentation for Cloud, the previous one was for Server.
The description sounds promising and I believe to remember having implemented this a few years back.
From the description it seems to be a match:
Put this post-function on the sub-task workflow on transitions where the workflow could be set, typically Resolve Issue. If all sibling sub-tasks are resolved this will transition the parent issue using the provided action, which should be valid for the current step. If it’s not valid, nothing will happen.
Could you please check if this is what you are looking for and if so, if it works?
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events