Forums

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

JMWE Validator Admin and Dev only Create IssueType

Jurica Petricevic
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 14, 2020

Is there a way to allow only two groups, say admin and devoloper, to opening one Issue Type? it would be desirable without Script Runner but with JMWE.

1 answer

1 accepted

2 votes
Answer accepted
David Fischer
Community Champion
September 14, 2020

Sure. You can create a Scripted (Groovy) Validator with a script like:

issue.get("issuetype").name != "Bug" || currentUser.isInGroup("devs") || currentUser.isInGroup("admin") 

Of course you'll need to adapt the code to the exact issue type and groups.  

Jurica Petricevic
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 14, 2020
issue.get("issuetype").name != "Change intern" || currentUser.isInGroup("Developers") || currentUser.isInGroup("Administrators")

 

No, won't work. For some reason I get this message

Fehler bei Groovy.PNG

David Fischer
Community Champion
September 14, 2020

Did you first "test" the Groovy script using the Test Groovy Script button on the Validator configuration page?

You can also check your Jira logs for a detailed error.

Jurica Petricevic
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 14, 2020

I was just in too much of a hurry. I didn’t save before the test. Great job. 

fehler fertig.PNG

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events