set security level in transition depending on users rolemembership

Dear all,

i wonder if anybody can give any advice to achieve the following:

We need to implement an mechanism which will set the issue security level in dependency to the new assignee role membership.

The Workflow extension (JIRA Misc Workflow Extension plugin in the version offers only the option to set the security level in the create-session transition. We need this over the whole WF in every transition.

Is this possible? Is there an script to use?

Thanks a lot and best regards


4 answers

I'm not sure what makes you think the "Set issue security level based on user's project role" function works only during the Create transition. It can actually be used on any transition. But it is based on the user doing the transition, rather than the assignee.

The post-function could easily be extended to support setting the issue security level based on the current assignee rather than the trnasition author. However, this enhancement can only be implemented in a new version of JMWE (e.g. 3.3.1), not on 2.5.x, which we are not maintaining anymore.

If you are interested, and willing to upgrade the plugin (which is now paid-via-Atlassian), you should raise an issue on our issue tracker at

As I said, this is not currently possible with the latest version of the plugin, but it could be implemented in a matter of days and provided to you in the form of a pre-release build. You would then be able to automatically set the issue security level based on the current assignee's project role.

But, as I said, JMWE 3.x is no longer free, so you would need to acquire a license (on the MarketPlace) after the evaluation preriod.

Hi David,

thanks for your explanations.

I search for an possibility which let us set the security level automatically in decency to the role the new assignee is in.

Is this possible in the last version of your plugin?

We need to avoid failures by setting the security manually from the user which is assigning the issue and selecting the wrong security level….

Thanks a lot

Julius Hüttmann

You can use the scriptrunnerplugin to add a postfunction in the create transistion on the first place at your workflow:

digagramm > Add Post Function To Transition > Script Post-Function > Set issue security level depending on provided condition


import com.atlassian.jira.ComponentManager
ProjectRoleManager projectRoleManager = ComponentManager.getComponentInstanceOfType(ProjectRoleManager.class) as ProjectRoleManager
ProjectRole guestsRole = projectRoleManager.getProjectRole("Guests")
projectRoleManager.isUserInProjectRole(issue.reporter, guestsRole, issue.getProjectObject())

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

466 views 8 27
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you