How do I set a status based on the resolution field?


I'm wondering how I can set the status based on the Resolution value a user chooses from a "Resolve" transition. For example, I have Resolution values of "Won't fix" and "Code Complete" and I want the issue to transition to two different statuses based on which one they choose. I can't seem to figure out how to easily accomplish this using transitions.



2 answers

This widget could not be displayed.
Joe Pitt Community Champion Jan 26, 2014

JIRA isn't designed to work that way. You set the resolution during a transition, so by definition you've already selected which status you'll end in because there isn't an option to have multiple exits from a transition. One option would be to have multiple transitions named after the resolution you want to set and automatically set the resolution when executing the transition.

This widget could not be displayed.

The short answer is that you don't.

A transition has a single end point, a fixed status. You can't change it. If you dig back through Answers (and their predecessor fora if they still existed), you'd find this question crop up a few times, and then you'd find a lot of people trying to change the end status in post-functions and bascially trashing their issues. Frankly, I've been paid quite a lot of money for unpicking the total mess people have made when they've tried changing the end-point during the transition. Much as I'm grateful for the opportunity of work, I have to say: "It. Does. Not. Work."

There are four basic approaches to working around it.

1) The JJupin plugin has a neat trick which makes it look like you've done this. It doesn't really do it, but it's so close, you won't care.

2) The usual trick is to create several transitions and block off the ones you don't want based on the field logic. Of course, this doesn't work for the cases where you're changing the data in a field during the transition (which is what you're doing)

3) The trick when 2 isn't appropriate is to have one transition to the "won't fix" status you want. Then create a transition from there to the other possible landing point. Then find or write a "listener" which catches the transition into "won't fix", runs your business logic (i.e. "is this actually code complete?") and if appropriate, triggers the second transition.

4) Have two transitions and set the resolution for the user instead of relying on the resolution to set the end point. (i.e. What Joe said)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

171 views 1 3
Join discussion

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