Allowing transition based on value and only to certain group

Sander Spoelstra December 11, 2022

Hi,

In a workflow, I want to do the following:

  • determine value of custom field (responsible department).
    • If value = DevOps: a transition needs to be restricted to a certain group.
    • If value = Projects: anyone can make the transition that has the correct role.

 

Its really simply to either place a condition on the value of a custom field, OR to put a restriction on the group that is allowed to transition, but combining them is giving me a hard time...

Anyone has an idea?

I've tried the simple ScriptRunner snippets, but I don't know how to control the transition in Groovy. The ScriptRunner documentation is not making me all the wiser on this point either :(

1 answer

1 accepted

4 votes
Answer accepted
Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 11, 2022

Hi @Sander Spoelstra 

You can create nested condition to build what you are looking for a bit like explain in this community question.

https://community.atlassian.com/t5/Jira-questions/Adding-multiple-conditions-to-Issue-transition-in-a-JIRA/qaq-p/847576

So you can add a block require all condition to be met for value = DevOps and Group = ...

Then add a new condition but only selecting "Any of the condition" with value = project.

 

Regards 

Sander Spoelstra December 12, 2022

@Florian Bonniec wow... I never new that it was a dropdown (completely missed the arrow down icon)!

You know how much I've scripted through the years that could have been solved with nesting?! 

It works like a charm, thank you so much for such a simple solution :)

Suggest an answer

Log in or Sign up to answer