In our project, there is a scenario where we have sub-tasks if we changed the status of sub-task into "Blocked" all the parent's issue status should be changed to Blocked.
Parent's can be more than 2 levels.
For Ex: Feature(parent)--->Epic(parent)-->Story(parent)--> story has 2 sub-tasks(Assume A & B), if I change the status of A or B to "Blocked" all the parents(All the way to feature) status must be changed to "Blocked".
To achieve this I've written a script which is just updating only parent status not all the layers. If you see above hierarchy if I change the status of Sub-task(A) it only updating the status of Story but not Epic and Feature.
Category log = log
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
Issue parentIssue = issue.getParentObject()
log.info("Updating the parent issue to Blocked")
Issue ppIsue = parentIssue.getParentObject()
log.info("Updating the Pparent issue to Blocked")
Any help would be appreciated!
Thanks in advance,
This is due to issue hierarchy. A story is plain issue, which can have sub-issues, so you can get parent story for sub-task. Epic is also just plain issue and a story is connected with epic using Epic Link field. So you can get epic by Epic Link Custom Field.
I am getting into this topic due I want to help my team to the parent ticket be updated automatically if the child is updated. Could you let me know where did you add the script above mentioned?
What I want to do basically is when the first subtask is moved from To Do to In Progress the parent ticket (story) be updated as well to in progress.
It'd be the main one... now if also can update the story as how the subtask is moving along the board would be terrific but let's to step by step :)
Thanks in advance!
Learn how to use two new reports for next-gen projects in Jira Cloud: Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...
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