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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It appears that when you create an issue the workflow manager forces you to go to "Open". Is this your understanding? Also, if it is, is there some way to move it to another status unconditionally within the workflow?
Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, no, again, the jump to "open" is a default, not an absolute. It's there because creating a workflow without a Create -> Open hook is a nightmare to code for - it's far easier to create it as a default. What you need to do is
For moving to another status unconditionally, no, not off-the-shelf. The point of a workflow is a human runs it. But, as there are cases where you could want to end up in more than one status, there are workarounds - listeners can do it, but also the script runner, as Jamie has already said.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
Cheers!
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.