I have successfully created an event-based action that creates subtasks for all users in a multi-user picker list (called 'Reviewers') upon the creation of an issue.
Now I want to do the same only for users that are added to the list without duplicating subtasks that already exist for users in the list. I have figured out how to trigger the event-based action when the Reviewers field is updated and now I need to iterate over the list of users and only execute for users who aren't already assigned to a subtask.
It would be nice to be able to delete subtasks for users that are removed from the list as well if possible.
Hi @Joylene Aguirre ,
Thanks for reaching out!
We are from Appfire, a vendor of the JMWE app. We’ll work with you and need a few details from your end.
A support ticket is created in our support portal for this case: https://appfire.atlassian.net/servicedesk/customer/portal/11/SUPPORT-165730.
We’d like you to sign up for the portal and let us know your username so that we can mark your ID as the reporter so you will be able to access the ticket.
Please find the below link to sign up on the portal: https://appfire.atlassian.net/servicedesk/customer/portal/11.
We are looking forward to hearing from you!
Thanks,
Teja
Hi @Joylene Aguirre ,
Good day! I hope you are having a great day!
In addition to the existing event-based action, please create an additional event-based action (EBA) with a trigger based on the value of the reviewer's field.
To create this new EBA, navigate to the EBA section and choose "field value changed" as the trigger. Then, select the Reviewers field as the field to monitor.
Create Issue :
Then, at the Post function, Select Create and Delete Postfunctions.
At the Create Post function, add the code below in Iterator, update the summary, and assignee.
Add a post function to create an issue with an iterator as
{% set added = issue | fieldHistory("Reviewers") | last | field("added") %}
{{added}}
Set Summary :
Subtask for {{it}}
Set the Assignee :
accountId:{{it}}
Delete Issue :
To delete subtasks for users that are removed from the list, add a delete post function
At Target issues select issues returned by following JQL Search and add below code. Please refer screenshot
{% set removed = issue | fieldHistory("Reviewers") | last | field("removed") %}
parent = {{issue.key}} AND assignee IN ("{{removed}}")
Please review and let us know if there are any issues.
Thanks,
Teja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.