Forums

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

Custom Script Validator on issue transition. Validate users

jjgalea
Contributor
March 22, 2017

Hi,

On a transition screen. A user is currently forced to enter a comment and also assign the issue. 

image2017-3-22 11:20:3.png

I would like to add a validator where the assignee can only set the assignee to;

the current reporter or a member of a group (senior-content-editors).

Can I please get some assistance on how I can set this? I also don't know which option I have to choose from this menu;

image2017-3-22 11:18:45.png

Cheers,
Jason 

1 answer

2 votes
Vasiliy Zverev
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.
March 22, 2017

Here is code for simple script validator

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue

if(ComponentAccessor.getGroupManager().isUserInGroup(issue?.getAssignee(), "senior-content-editors"))
    return false

if(issue.getReporterId().equals(issue?.getAssigneeId())){
    return false
}

return true

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events