I am trying to set the Priority field to a specific value via a Behaviour. This is my code:
import com.atlassian.jira.issue.IssueFieldConstants
import java.util.List
FormField formPriority = getFieldById(IssueFieldConstants.PRIORITY)
List<String> myList = new ArrayList<String>();
myList[0] = "5"
formPriority.setFormValue(myList)
There is no error in the script, but it does not set the value.
Logs show:
/rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/runvalidator.json [onresolve.jira.groovy.BehaviourManagerImpl] Returning map: [priority:[setValue:[5], fieldType:com.atlassian.jira.issue.fields.PrioritySystemField, displayName:Priority]]
Anybody knows what is wrong with this script? Does the setFormValue for Priority field take string/list/object?
-Rahul