Conditions to execute transition

Maya May 9, 2023

How to block user role from executing certain issue transition when they are also the assignee of the issue?

2 answers

1 accepted

3 votes
Answer accepted
Anna Hryhoruk _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2023

Hello @Maya 

As it was discussed above, it`s possible to configure such logic using Condition from Power Scripts 
Here is an example of such Condition SIL script: 

if( isUserInRole(currentUser(), project, "Developers") and assignee == currentUser() ) 
return false;

Some helpful documentation about it you can find here  https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15487273/Writing+Conditions+Validators+and+Post+Functions
https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15481301/Conditions

Hope it helps!
Anna 

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2023

You can do this by adding conditions on the transition that the user has to be in a specific role. If the user is not in that role the transition vill not be visible to them. See Configure advanced issue workflows for more information.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2023

@Mikael Sandberg 

I don't think your suggestion meets the requirement.

As I understand it the user should be blocked from making a particular transitions for a specific issue only if they are the Assignee on that issue. If somebody else is the Assignee, then a user who is not the Assignee should be able to complete the transition. I don't think this scenario can't be covered by using Conditions based only on Role-based Conditions, as there is no Condition (natively) to ensure the users is not the Assignee.

Like # people like this
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2023

@Trudy Claspill That was not my interpretation of the requirement, but if that is the case you could still use conditions. There is one for separation of duties that you could utilize in that case, something like this:

Screenshot 2023-05-09 at 2.52.12 PM.png

This of course assume that there is a transition that the assignee does before getting to the one that should be restricted. It that is not the case then you would need to look for an app in the Marketplace that extends the conditions and allows you to add a more complicated one like Scriptrunner, Power scripts or any of the other apps that can do that.

Like # people like this
Maya May 10, 2023

@Trudy Claspill Your interpretation is correct. Thank you for clarifying the requirement.

Suggest an answer

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

Atlassian Community Events