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

0 vote
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.

0 vote

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
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 yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

42 views 0 4
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