Hi Team,
I have a requirement,
If the "Team Manager" and "Team Manager - Validation" fields (both are user picker type fields) on the parent ticket are empty, Assign to the person on the "Team Manager - Validation" field in the Sub-Task ticket (copy the "Team Manager - Validation" to Assignee)
I used this copy field to field JMWE post function, but its not working. Is there any correction in the function.
((issue.get("Issue Type")?.name == " Parent Ticket") && (issue.getAsString("Team Manager") == " " && issue.getAsString("Team Manager - Validation") == " "))
Hi @Lakshmi CH
I'll not sure I understand what you're trying to achieve. Could you please explain it with an example? Also, can you share the full configuration of the post function, not just a script without context?
Hi @David Fischer ,
Apologies for the confusion!
We have two user picker fields "Team Manager" and "Team Manager - Validation" on both parent and subtask.
If the "Team Manager" and "Team Manager—Validation" fields on the parent ticket are empty when a subtask moves to a particular transition, then the value of the "Team Manager—Validation" field on the subtask should be copied to the "Assignee" field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lakshmi CH
since the post-function is triggered by a transition of sub-tasks, the "current" issue in the post-function is the sub-task, and therefore the "issue" variable refers to the sub-task, not its parent.
Therefore, the conditional execution script should be:
issue.parentObject && !issue.parentObject.get("Team Manager") && !issue.parentObject.get("Team Manager - Validation")
Of course, I'm assuming the post-function is already configured to copy the "Team Manager—Validation" to the Assignee field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much @David Fischer . It's working as expected now.
Yes, I added the post-function copy the "Team Manager—Validation" to the Assignee field, and added the above line of script in "Condition"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!
Start here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.