Restrict "Bug" Issue Type Creation With "Script Validator"

Fabio Rodrigues July 21, 2017

Hello,

I would like to restrict creation of "Bug" issue type to everybody in JIRA because this kind of ticket is created in another tool and transferred to JIRA using CRM Plugin.

I'm trying to use "ScriptRunner" and "Script Validator" in the workflows, in the "Create" transition, but I don't know how the script would look like. Any ideas?

Regards.

1 answer

0 votes
Gaston Valente
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.
July 21, 2017

Fabio, it should be something like this:

issue.issueTypeObject.name != 'Bug' || currentUser.name == '[crmuser]'
Fabio Rodrigues July 21, 2017

Thanks Gaston.

Do you know if there's a way to hide "Bugs" from the list of issue types available when creating a new ticket as well?

Regards.

Gaston Valente
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.
July 21, 2017

There's no standar way, but you can achieve this using addons.

Fabio S August 4, 2017

Do you know what function I should use to allow only one group (not role) to create "Bugs"?

Fabio S August 8, 2017

Or can I use "currentUser.name in (user1, user2, user3)"?

Suggest an answer

Log in or Sign up to answer