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.
Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their Jira Cloud instance. ...
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