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

Amir Katz (Outseer)
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.
September 1, 2022

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)

Amir Katz (Outseer)
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.
September 1, 2022

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 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.

Amir Katz (Outseer)
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.
September 25, 2022

@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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 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
Community Managers are Atlassian Team members who specifically run and moderate Atlassian communities. Feel free to say hello!
September 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
Community Managers are Atlassian Team members who specifically run and moderate Atlassian communities. Feel free to say hello!
September 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!

Amir Katz (Outseer)
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.
September 28, 2022

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

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events