Forums

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

User Picker (single user) cannot be the same as the Assignee throughout the workflow

John_Diaz March 20, 2020

I'm trying to figure out how to not allow users to select a user from the User Picker (single user) custom field and assign that same user to the Assignee field at any point of the workflow.

So if my User Picker field name is called Validator and I select myself as the Validator then I cannot be the Assignee of that same JIRA issue.

Is it a behavior or groovy script listener?

2 answers

1 accepted

0 votes
Answer accepted
Aditya Sastry
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.
March 20, 2020

I am not sure if behavior will work here but listener definitely can.

Quick Solution I can think of is to "Fast Track transition an Issue" when an Issue is assigned.

Create a workflow step with condition to programmatically execute and have a post function to clear the assignee in case the fields match.

Aditya Sastry
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.
March 20, 2020

The problem with behaviour is, the changes will not reflect in the view screen unless you go to the edit screen

0 votes
Andrew Laden
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.
March 23, 2020

In general, there are two places you can do this

1: In a workflow condition or validator. Advantage is that is it probably easier to set up. The disadvantage is that it only works when you are transitioning an issue. IE, someone could edit the issue to make the validator the assignee and it would allow it. It would only be a problem when you actually try to move the issue along the workflow. Exactly what validator would work depends on what addins you have in your instance.

2: Using script runner behaviors, (or live fields from powerscripts) which can be set to take actions when the field is updated. Can be used to prevent the field from getting updated. But it is more complicated to set up.

Suggest an answer

Log in or Sign up to answer