Anyone have any suggestions on how to change the status of an issue from its default status to another status based on the value of the issue type?
I'm not sure what a "default status" means, but I'm assuming it's the status an issue is created in?
The most simple approach is to create a new workflow which starts with a different status, and associate it with the issue type.
For example, if you have "bug" and "improvement", then you create a bug-workflow, where the "create issue" transition lands on (say) "new", and for the improvement-workflow, the create should land on (say) "open". You then use "workflow schemes" to tell your project which workflow to use for which issue type.
Btw -- your initial assumption is correct -- the default status is the status the issue is created in, in this case 'New'. It is defined in the emh.properties file in the jira instance.
The emh.properties file is not where the status is defined, the status is a function of the workflow. From (dubious) memory, the file you mention is just where Jira creates the default workflow from when you install it.
I'm not sure how I can explain configuring workflows better than the docs - http://confluence.atlassian.com/display/JIRA/Configuring+Workflow
Thanks Nic. I think you are on to something here. Let me elaborate since you had a good question at the beginning:
Senario: All new issues are created with a status of 'New' with the exception of one issue type, which after being created must be given a different status other than new.
So knowing that, do you think just having a separate workflow for that issue type would work? Could you clarify how this would be done?
Cheers!
The problem with Nic's suggestion is that you end up with a multiple maintenance problem with all these only-slightly-different workflows.
You could try the fast-track transition built-in script from the script runner plugin. You would create one workflow only, where the starting status is New. Then you use the above to automatically transition to say, Open if the issuetype is whatever. You need to have an action from New to Open, but you can prevent it being shown with a condition.
My instinct is always to explain how to do something without plugins first. The script runner, or finding/writing a listener are also options, although you will end up with a single workflow, you've just moved the complexity into the script/listener - someone looking at your workflow won't instantly see how the second status arrives.
Also, a question, if you do it with the script runner, won't you end up wit a two step history? (Not that this is a problem in the slightest, just curious, because I've never tried it)
Yes, I think your answer was spot on, it's important to know how to do things without plugins first. I was only quibbling with the actual method you suggest, not your answer.
And yes, the automatic action is recorded in the history.
Hello Nic,
I don't see how I can '2. Edit the Create Transition' from your suggestion above (which I like, by the way). The Workflow Designer will not allow me to 'disconnect' the step from 'Create' to 'Open'. Any explanation as to why this may be so?
It looks like you're new here. Sign in or register to get started.