Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Global "All" Transition not respecting Condition

Rosa M Fossi
Contributor
January 7, 2023

Hello Everyone,

I set a condition on one of the "ALL" transition steps in my workflow, but the workflow is not respecting the condition. 

Specifically, I do not want my Canceled status issues to be able to transition to Blocked status, so I've set a condition on the ALL transition associated with Blocked: The Issue's current Status must not be Canceled but I'm still able to transition from Canceled to Blocked.  

Is this as designed for the global transitions?  The documentation reads as if it should work like any other transition.  I tested a Validator (regex match) in that global transition and it worked as expected. 

Any insight would be appreciated!

 

2 answers

1 vote
Ste Wright
Community Champion
January 7, 2023

Hi @Rosa M Fossi 

I've assume this is for a Company-managed Project.

I tried to recreate this and I'm seeing similarly inconsistent behaviour using the Previous Status Condition. 

I couldn't make it work consistently using that Condition, so I used the Value Field Condition instead, which should work. Set the parameters of the Value Field Condition on the "Blocked" Status to:

  • Field = Status
  • Condition = "!="
  • Value = Canceled
  • Comparison Type = String

^ Publish the workflow, and this should then work as required. Make sure you remove the other non-working Condition also!

Let us know if this works!

Ste

Rosa M Fossi
Contributor
January 7, 2023

Thanks for the quick response!!

I've tested a bit, and it looks like using Value Field condition works... but only as long as it is the ONLY condition in play.  When I got fancy and tried to use the "any of the following conditions" to block the transition from another Status (Done) it ceased to work and allowed the transition to work from both Done and Canceled. 

two-conditions.png

I tried to use the Value Field Condition to check Status Category Field like so: 

  • Field = Status Category
  • Condition = "!="
  • Value = Done
  • Comparison Type = String

but that didn't work either. 

This feels like a bug to me, no? 

Ste Wright
Community Champion
January 7, 2023

Hi @Rosa M Fossi 

I also couldn't get the Status Category to work effectively.

I'd recommend for Status Category, raising this as a bug - you can do so from here: https://jira.atlassian.com/secure/Dashboard.jspa

I did get two Statuses to work though - I used the All of the following conditions rather than the Any - i.e the Status cannot be from the following list.

Another alternative is to use Resolution (i.e to transition to Blocked, Resolution = EMPTY) - assuming resolution is being set for all "Done" Statuses :)

Ste

Ste Wright
Community Champion
January 8, 2023

Hi @Rosa M Fossi 

Just to add an update, I think I've clarified the logic for the Previous Status Condition.

Because it's a Condition - limiting the ability to transition an Issue - the Previous Status is referring to the transition before the one being made - not the current Status an issue is in.

So for example...

  • Previous Status Condition is set to "Canceled" on the Blocked transition
  • Issue A can be transitioned from Canceled > Blocked, because the current Status is Cancelled
  • But if Issue A was transitioned from Canceled > In Progress, Blocked would not be an option, because the previous Status was Canceled

For current Status (which is your need), it looks like my recommendation above is the best approach - using the Value Field Condition. But the Previous Status Condition does seem to work as designed.

Ste

0 votes
Rosa M Fossi
Contributor
January 31, 2023

@Ste Wright  Hi Ste, I'm just coming back from 🎿 holiday and playing catchup at the office!  Thank you so much for the additional responses. 

I did get two Statuses to work though - I used the All of the following conditions rather than the Any - i.e the Status cannot be from the following list.

I'll implement and see what it yields! 😎

Ste Wright
Community Champion
February 3, 2023

Let us know how it goes :)

Ste

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events