Hi,
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.
thanks,
-Jeff
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)
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.