Hi,
We recently upgraded JIRA to version 7.2.4 and script runner plugin 4.3.16 is used.
The groovy scripts used for sub-task creation, assignee, set due date is not working now.
I used the below script in JIRA 6 at additional issue actions section and it was working there.
import com.atlassian.jira.user.ApplicationUsers
issue.summary = sourceIssue.summary + ' - Summary ';
//SET ASSIGNEE FOR Sub-task
if (cfValues['Product]*.value.contains("A")){
cfParent = customFieldManager.getCustomFieldObjectByName('Userpickerfield')
parentMyFieldValue = transientVars["issue"].getCustomFieldValue(cfParent)
if (parentMyFieldValue != null)
{
issue.setAssignee(ApplicationUsers.toDirectoryUser(parentMyFieldValue))
}
//SET DUE DATE
def cf = customFieldManager.getCustomFieldObjectByName('Datefield')
val = issue.getCustomFieldValue(cf) - 9
issue.setDueDate(val)
}
I am getting error at bold lines.
Please suggest a solution.
Thanks