I have a listener script in ScriptRunner which runs when an issue is created within Service Desk and sends a linked issue to a relevant software project (based on request type selected).
As some requests are Service requests with approvals. I would like to hold off running the script until the status changes (from ‘waiting for approval’) to ‘waiting for support’.
If anyone could help by advising what I needed to add to my current script to achieve this, that would be greatly appreciated!!!
Here is the current script:
import com.atlassian.jira.component.ComponentAccessor
def cf = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("Customer Request Type")
def requestType = issue.getCustomFieldValue(cf)
if(requestType.toString() == "de/f0449f4c-a359-4d60-b516-70034ff84321")
{return true}
Thanks