Need to update a custom field based on the resolution status of linked tickets.

We have a business requirement to update value of a custom field in a JIRA project based on the resolution status of all linked tickets. So when all the linked tickets are resolved, we have to update the value of the custom field to resolved. Otherwise, even if one of the linked tickets is not resolved, the value of the custom field will remain 'In progress'.

 

We have a project called "Escalations" where a business user can create an issue, for example JIRA number "ES-20". We have a custom field, "Resolve Status" in Escalations project and the moment ES-20 was created, the value of "Resolve Status" was set to "In Progress".

Now, upon investigation by development team, they decide that ES-20 actually is a bug in software and will require changes to backend as well as frontend. We have a separate project for backend (BE) and separate for frontend (FE). So they decide to create 2 issues in backend project (BE-31 and BE-32) and 1 issue in the frontend project (FE-44). Then they link these 3 issues to ES-20. So ES-20 now has BE-31, BE-32 and FE-44 linked to it. Development teams then separately start fixing the issues and once all 3 issues are fixed they mark it resolved. The moment BE-31, BE-32 and FE-44 (all 3 of them) are resolved, the value of "Resolve Status" custom field on ES-20 is updated to "Completed". The status of ES-20 will then later of be set to Resolved, manually by development team. Is it possible to update the value of "Resolve Status" custom field?

2 answers

I think this could be done without much code using workflow trickery and the Misc. Workflow Extensions plugin. To simplify, i'll call the issues Child and Parent. I'd investigate something like this:

  1. In the child issues workflow, create a post-function in the transition that leads to the status where the issue is resolved. That post-function should try to transition linked issues through a specific link that you set up between the parent and child issues.
  2. In the parent issue's workflow, create a transition to set the resolution of the issue, and add a post-function. That post-function should set the resolution to Completed. It's not necessary to have the transition lead to another status by the way. A transition from "In Progress" back to "In Progress" is possible.
  3. That transition should have a validator to prevent the transition if all linked issues are not resolved (either a value in the Resolution field, or in a Resolved status). Not 100% sure this part can be done with a validator though. I'm sure it works with subtasks, but linked issues i'm not sure. Perhaps a Groovy condition in the post-function would do the trick.
  4. Add a condition to hide that transition from users, since it's only meant to be called through automation.

So basically, you want the child issues to try and transition the parent issue when one of them is resolved, and you want the parent issue to validate it can transition, or to prevent the resolution from changing at least.

 

Thank You Nicolas. This looks like a promising solution. We will give it a try and see how far we get. Really appreciate your help and the quick response...!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 2 hours ago in Stride

New Statuspage App for Stride

It takes a village to identify, fix, and communicate about incidents. While developers and SREs work hard to get things up and running, support and marketing teams communicate with customers. Yet whe...

15 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you