Forums

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

Condition in workflow transition not working as expected

Masa Janezic October 27, 2021

Hi,

We have this working workflow for a custom issue type called Access Request. 

1.png

In short, once a request is approved, the issue transitions to status IN PROGRESS then we have a few dependencies which decide which of the following statuses is possible. Currently I have an issue with the marked transition which goes from IN PROGERSS to Resolved. That's the Resolve transition which in its purpose is connected to the Access Created transition.

The purpose is that when an approved request has been realized (creating user access in IN PROGRESS status) the created credentials are sent to a user. This step is documented when an issue is transitioned with Credential sent from ACCESS CREATED to RESOLVED status. We need this documented for external users who gain access through an Access Request.

As you can see, the RESOLVED status can be reached directly from IN PROGRESS status as well. But in the event that a user is external, I don't want to allow this direct transition because the sent credentials must be documented. 

We have a custom single-select field in our screen called Employee Type which includes an option called External. Using this field and the External option, I created a condition in transition Access Created defining that if Employee Type equals External this transition is enabled. I'm using the JSU plugin and their condition, Value Field (JSU) Condition. The field is set with its name and the option with its ID.

On the other side I applied another condition. In direct Resolve transition from IN PROGRESS I created a condition that Employee Type does not equal External. I want to achieve that this transition is not possible when Employee Type equals External. Which is why I conditioned it to work only when Employee Type does not equal External, again using the Value Field (JSU) Condition.

BUT! In a test Access Request that I created, the transition Resolve is still possible. Meaning that the workflow condition does not work as expected. In the image below I marked Resolve as not possible with a red diagonal line because it should not be there, Access Created transition should stay possible because our Employee Type equals External.

2.png

At the same time the condition I set for the transition Access Created works as expected. In the picture above, you can see it in the Workflow dropdown, while below, where Employee Type does not equal External, the transition isn't there because the set condition will not allow it.

3.png

Can you help me with the above condition in the direct Resolve transition going from status IN PROGRESS to RESOLVED, please? Resolve should not be a possible transition in status IN PROGRESS when Employee Type equals External.

We are using:

  • Jira Server v8.13.2
  • JSU plugin v2.27.0

2 answers

1 accepted

0 votes
Answer accepted
Masa Janezic November 8, 2021

I ended up writing to JSU support. Btw, they have awesome people working there and we solved the problem with Sayed. Turns out the conditions in resolve transition weren't set correctly for all my use cases.

Here's an image with all conditions in the direct resolve transition from in progress to resolve. The numbers specify the order in which they were created. They just need to be grouped in the correct order.

image2021-11-5_12-56-32.png

0 votes
John Funk
Community Champion
October 27, 2021

Hi Masa,

Can you share a screenshot of your Conditions on the transition from IN PROGRESS to RESOLVED?

Masa Janezic October 28, 2021

Hi John and thank you for your message.

Sure, here it is.

1.png

The 3rd condition is the one we're looking at with the current issue. The option ID number 12677 is External option in Employee Type custom field. 

Above that you can see two more conditions that are grouped. They serve for another condition I have set in the transition Anonymization. That transition has a similar rationale to what we're doing here and it's looking at values from another field. 

I was wondering if they somehow interfere with one another but I don't really see the reason why or how this could happen. Do you think those grouped conditions could have any sort of impact on not being able to hide Resolve transition when Employee Type does not equal External?

Thanks for reaching out and I hope you see something I don't :D 


Edit:

I tried updating JSU plugin to the latest version, 2.29.0, just in case but this alone hasn't changed anything.

John Funk
Community Champion
October 28, 2021

To me, the last condition says where "Employee Type" = External

but then the next line says that Employee Type != External (12677)

So it sounds like both are allowed all of the time. 

Masa Janezic October 29, 2021

You're right. I meant to disable that third condition before taking a screenshot. I was testing something prior to replying. I'm sorry for the confusion.

The condition you spotted isn't there anymore and the direct Resolve transition is still seen in the issue. Do you think anything else could be causing this problem?

Deleted the third condition:

1.png

Resolve transition is still seen after publishing the changes in workflow.

2.png

At this point I'm not too sure where else to look for an issue with this. Where else do you think I could look?

Thanks again for your time.

Suggest an answer

Log in or Sign up to answer