Hi Team,
How to validate the parent ticket fields in the subtask post function.
The requirement is :
On the parent "Project" issue type has New Customer = Yes and Solution Engineer is unassigned and Solution Strategist - Engineer is not unassigned
Action on that parent-related sub-task---------- Assign to Solution Strategist - Engineer from the parent "Project" when ticket is moving to particular transitions.
I used "Copy Issue Fields Post Function"
Source Issue : Parent Issue of the current sub-task
Destination Issue : Current Issue
Fields to Copy : Solution Strategist - Engineer to Assignee
And the condition is :
issue.parentObject.issueType.name == "Opportunity" && issue.getAsString("customfield_34222") == "Yes" && issue.getAsString("customfield_32105") == "'
I think i am accessing current (sub-task) issue fields here (issue.getAsString("customfield_34222") == "Yes" && issue.getAsString("customfield_32105") == "'), how to access the parent ticket values ?
NVM, I figured out.
We should use the below script to access the parent ticket values in the subtask.
issue.parentObject && issue.parentObject.get("customfield_34222") == "Yes"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.