How do i transition an issue automatically based on usergroup?

Bart Meerveld
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.
August 8, 2016

We have a scrumproject where we want have issues on a kanban board first, where they can be reviewed by the PO or be set to low priority. After the PO has reviewed them they can be transferred to "open" and they will appear on the regular backlog.

This works like a charm and i can recommend it to anyone. But the PO would like one small change, when the scrumteam themselves (let's call them team test) create an issue (so no external users) they would like it to start in the "open" status, no review by PO necessary. I can automatically transition it based on a groovy script but how would i write such a script? that if the reporter is a member of team test it will automatically transition to "open"?

 

Thanks in advance!

1 answer

1 accepted

0 votes
Answer accepted
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 8, 2016

In Script Runner plugin there is a built-in post function script called

"Fast Track transition an issue" you can use that to transition an issue to open and configure a "condition" in groovy in that post-function that reporter belongs to a particular group

import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
groupManager.isUserInGroup(issue.reporter?.name, 'test')
Bart Meerveld
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.
August 8, 2016

That looks good, where in this script should i fill out the name of the group?

Is it where now 'business users' is typed?

 

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 8, 2016

I have updated the script

Bart Meerveld
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.
August 8, 2016

Thanks!!!

 

Suggest an answer

Log in or Sign up to answer