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"
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.