I working on project, where issue must change status automatically based on custom field value set on previous step. I try do this by Automation for Jira Add-on, but it work too slowly and I want to use Script Runner to this. I use Fast-track transition an issue but I would have to use several such functions. So i try to do this by this script, problem is that doesn't work, can you tell me what I do wrong?
//boolean status = false
WorkflowTransitionUtil workflowTransitionUtil = ( WorkflowTransitionUtil ) JiraUtils.loadComponent( WorkflowTransitionUtilImpl.class );
IssueManager issueManager = ComponentAccessor.getIssueManager()
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()
CustomField myCustomField = customFieldManager.getCustomFieldObjectByName("Category")
String myCustomFieldVal = (String) issue.getCustomFieldValue(myCustomField)
To transition correctly following lines are needed
And generally speaking, your import lines should be less than your code lines :P.
Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events