ScriptRunner - Transition Issue based on Assignee value

Sam February 7, 2018

Hi,

Can you please help me create a groovy script:

If Assignee field was changed from "Unassigned"

then

move an issue to "status name"

 

I'm trying to use "Fast-track transition an issue"

Events: Issue Assigned

Condition: I'm not sure

Action: Transition/status name from particular workflow

 

Thank you

 

 

1 answer

2 votes
Roland Holban (Adaptavist)
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.
April 12, 2018

Here you go! Create a Fast-track transition listener and put this in the condition field:

// Gather changed field at the Issue Updated
def field = event.getChangeLog().getRelated('ChildChangeItem').find{it.field == "assignee"}

// Gather old field value
def old_field_value = field.oldstring

// Gather new field value
def new_field_value = field.newstring

old_field_value == null && new_field_value != null

Suggest an answer

Log in or Sign up to answer