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.
issue.summary = sourceIssue.summary + ' - Summary ';
//SET ASSIGNEE FOR Sub-task
cfParent = customFieldManager.getCustomFieldObjectByName('Userpickerfield')
parentMyFieldValue = transientVars["issue"].getCustomFieldValue(cfParent)
if (parentMyFieldValue != null)
//SET DUE DATE
def cf = customFieldManager.getCustomFieldObjectByName('Datefield')
val = issue.getCustomFieldValue(cf) - 9
I am getting error at bold lines.
Please suggest a solution.
1.cfParent- The variable cfParent is undeclared.
2. parentMyFieldValue - The variable parentMyFieldValue is undeclared.
3. getCustomFieldValue-Cannot find matching method
4.issue.setAssignee--Cannot find matching method
even we corrected these errors, sub-tasks are not getting assigned to the custom field value which we entered as users.
If you corrected mentioned error and the error mentioned by me then it should worked
you can write a log.error("==="+ parentMyFieldValue) and check in the log file that you get a expected value for assignee.
like this you can debug your script line by line and find out the where exactly error comes
If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot