Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,370,153
Community Members
 
Community Events
168
Community Groups

Workflow validator to check if the assignee is not one of a list specific of users (uses JMWE)

I recently had a requirement that certain workflow transitions should fail if the assignee is one of three specific users.

Note that using this method, any number of accounts can be checked.

I am using the JMWE-provided build-your-own scripted validator, using this simple code:

let bad_users = ["abcdabcdabcdabcd", "1234567890abcdef", "0987654321abcdef"];
!!issue.assignee && !bad_users.includes(issue.assignee.accountId)

The secret that many admins are not aware of is that you can have multi-line code, using the ';' delimiter before the newline.

This works like a charm.

8 comments

Just noticed the typo is the title, but there's no edit button...

Come on, Atlassian, even Twitter now lets you edit tweets!

Title should be 

Workflow validator to check if the assignee is not one of a list of specific users (uses JMWE)

Two minor comments:

1. JMWE is a paid add-on, but I find it extremely useful and worth its cost

2. I'm almost certain that the same functionality can be achieved with ScriptRunner (which we also have), but I have not tried that.

Jimmy Seddon Community Leader Sep 23, 2022

@Amir Katz _Outseer_ the edit button is in the "..." menu.  If you were able to post the article you should be able to edit it.

@Jimmy Seddon - When I click on the ... menu, I only see this:

2022-09-25 12_52_24-Workflow validator to check if the assignee is not... - Atlassian Community.png

Jimmy Seddon Community Leader Sep 25, 2022

@Monique vdB who do we need to get involved to take a look at permissions for this?  It feels weird to me that someone can post an article, but they don't have permissions to edit their own post.

Thanks!

Monique vdB Community Manager Sep 26, 2022

@Jimmy Seddon thanks for tagging me! This does seem odd and I will take a look.

@Amir Katz _Outseer_ I updated the title of your post for you and will look into why you're not seeing the edit button.  You should be able to see it to edit your own posts. 🕵🏻‍♀️

Monique vdB Community Manager Sep 26, 2022

@Amir Katz _Outseer_ I made an update to the permissions, let me know if you can see the edit button on this article now. thanks!

@Monique vdB  Thanks, I now have the edit button.

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events