I have a workflow in which I have introduced a status'On Hold' Now I want all the statuses to be able to transition to 'On Hold' except for the 'closed issue' status.
Selecting the checkbox 'Allow all statuses to transition to this one' will mean even The 'Closed issue' Status can be put On Hold. Which does not seem logical.
I know I can add transition from each status to 'On Hold'. But is there a better way to do it?
Hi,
I wanted to achieve the same thing with the `Duplicate` state and didn't want to have incoming transitions from all other statuses
Solution 1 (Failed)
Add the following condition: `Previous Status Condition` to the transition. Check `Most recent status only` and also `Reverse condition`.
But this doesn't work because it checks for the previous status and not the current status of the issue.
Solution 2 (Success)
Add the condition: `Value Field Condition` to the transition. Choose `!=` and type the String value of the status you want to exept. Make sure it matches with capitals letter (i.e. Duplicate, Won't Fix).
This will work as a charm!
This works! Note the "Value Field Condition" is part of the free add-on "Suite Utilities for JIRA"
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.
Update to @Henning Kasch's post: the add-on is now called "JSU Automation Suite for Jira Workflows" and is free on Jira instances with up to 10 users. Mine currently has... 11. 🙃🫠😭
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.
Hello,
I think I had the same problem. I solved with Scriptrunner (I have version 6.0.x)
// EXAMPLE STATUS ID = 11000
if ( issue.getStatus().getId() == '11000' ) { return false; }
else { return true; }
I hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No is the short answer. The reason the "all" is there is to save the effort of having to link a transition loads of times. But there's no way anyone can predict "all except". For that, you should do it the way it's designed - create one transtion and reuse it where you want.
The other option is to add a condition to the transition that says "if current status = closed, do not allow transition". It'll look odd in your workflow diagrams, but the users won't be able to use the transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic,
Thanks for the solution. I will try to incorporate the same. If it is successful I will update the forum with the result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am guessing there have been changes in "transition editing" since this answer was written because I do not seem to have the ability to add a condition as I wish. Upon clicking the "Add Condition" button it lists out a set of conditions (radio buttons) to choose from. And "if current status = closed, do not allow transition" is not one of them.
Any idea how this requirement can be achieved now?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's not been removed. It was never there in the core product - you have to add it yourself with an add-on that provides the condition, or create a script for it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your answer Nic.
Which add-on provides the condition?
I also need to know how to add a script to a condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Supriya,
You can use Current Status Condition (JMWE add-on)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your answer.
If I need to exclude the current status in the transition, how can I do the same?
For example: If a task is currently in Progress and it can move to all transitions except the current one(in progress) and Resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Change the workflow so that it does not have the transitions you do not want in it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have created a custom field "Closed State"(Single line text) with value Yes
On close transition, a postfunction - update custom field to set "Closed State" as Yes
Added a condition for "On Hold" transition as value field "Closed State" != Yes
Hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That really doesn't help, as you now have a custom field to partially represent status, and it's nothing to do with the workflow.
You should remove that field and put your workflow together properly, such that it represents the closed status and others correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.