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 S
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 S
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.
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.