You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
We have a Requirement to restrict some users for creating particular issue types
For eg - User1 (these are included in a particular Grp ) cannot Create EPIC
We have Scriptrunner and Automation any way we can do it?
Hi @Sanjivani Wayal ,
To restrict Create Epic to users in a particular group, add the below Jira Expression Validator(Script Runner Jira Expression) to the Create Screen of Epic.
!user.groups.includes('Developers')
Hi @Somnath Patil Can you please help with this where exactly do i need to write this is it in Script Console of Script runner or on some validator or Post function in workflow ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sanjivani Wayal ,
As you mentioned you have ScriptRunner. Add validator on a create screen of Epic and use ScriptRunner Script validator and paste this cod : !user.groups.includes('Developers')
Replace Developers group name with the name you want to restrict.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did that , its not working maybe because i have name of group of users is need to restrict like "JIRA_GRP1" and not a specific name or a single user
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sanjivani Wayal ,
use : user.groups.includes('JIRA_GRP1') If you want User in "JIRA_GRP1" should be able to create issue.
use : !user.groups.includes('JIRA_GRP1') If you want to User in "JIRA_GRP1" should not be able to create issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Somnath Patil Thank you so much that really worked
I have 1 more question iam working on Sending Notification emails , However currently its sending the accountid and we need to change it to username and we have issues with customer name those are added in a Group any idea how can i mention it in automation i have created have below example :-
[~accountId:{{user field name.accountId}}]
Hi [~accountid:{{Squad leader.accountId}}], could you please assign this bug to someone on your team?
//returns Hi @Alana Grant, could you please assign this bug to someone on your team?
But i have the group where user names are added.
Any idea how will it work for Group when that name is mentioned in comments using @
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use a groovy validator (Post-Function) on the Create transition of your Workflow to accomplish this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sanjivani Wayal - You will need to add a Validator. If the validator returns false the transition will be denied (the issue wont be created).
We used the Scripted (Groovy) Validator provided by JMWE, but ScriptRunner also provides an option for a scripted validator and you would likely pass something like this into the script editor.
ComponentAccessor.getGroupManager().isUserInGroup(currentUser, "<YOUR GROUP>")
The expression must return TRUE for the transition to occur.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.