Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Rahul Bhat
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 8, 2016

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

1 vote
Nicolas Bourdages
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 8, 2016

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.

 

Chris Dunne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 8, 2016

Excellent answer.

0 votes
Rahul Bhat
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 16, 2016

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
TAGS
AUG Leaders

Atlassian Community Events