Newbie question:
I need some help to get the assignee of the parent issue type in a sub-task transition.
Scenario
- A transition e.g. 'Cancel ticket' in a sub-task workflow is available only to the assignee of the parent ticket.
- If the current assignee of the sub-task does not equal the assignee of the parent ticket, then the transition button should be hidden.
How can this be achieved in a sub-task transition using a scripted condition?
I tried the below:
issue.getAssignee() == return(parentIssue?.get("assignee")?.getName())
This gives me the below error:
The script could not be compiled:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script562.groovy: 1: unexpected token: return @ line 1, column 24.
issue.getAssignee() == return(parentIssue?.get("assignee")?.getName())
^
1 error