Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation: How to create subtasks for all users listed

Martin Vali
Contributor
October 21, 2024

 

 

How to make automation so that when I change the status to review automatically subtasks are created all users who are in reviewers (multiuser field) field

4 answers

3 accepted

2 votes
Answer accepted
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2024

HI @Martin Vali 

Can you show the configuration of the automation rule you already created to fulfil this request and show the audit log in case of errors.

The will help community members in your way of thinking and getting to a solution.

It will also help you to understand the solution provided (if possible), to understand the concept of the solution.

0 votes
Answer accepted
Martin Vali
Contributor
April 6, 2025

More help needed

How to set due date so that it takes change of transition from Draft top In Review date +5 days

image.png

Martin Vali
Contributor
April 6, 2025

{{now.plusDays(5)}} :)

0 votes
Answer accepted
Martin Vali
Contributor
February 28, 2025

@Marc - Devoteam 

I want to add myself as a watcher to those made subtasks, but don't seeme to find a wayimage.pngimage.pngimage.png

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2025

Hi @Martin Vali 

What if you (based on the last screenshot) set the branch on "All created issues"

Like Martin Vali likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2025

Greetings!

Branches cannot be nested (to add the watcher to the created subtask), and...

Because branches execute in parallel and asynchronously, the watcher cannot be added with a final branch in the rule to do so.

 

There are two possible solutions:

 

Kind regards,
Bill

Like Martin Vali likes this
Martin Vali
Contributor
March 3, 2025

@Bill Sheboy thanks - well the 1st option is little hard for me to dig in currently - the second is ok

Like Bill Sheboy likes this
2 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2024

Hi @Martin Vali 

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!

Until we see those...

 

Your rule could use advanced branching to loop over the multiple-select user custom field to add the sub-tasks:

 

Please note well: there are several cases to handle for a scenario like this, perhaps requiring more rule complexity or additional rules.  So consider which you want to handle:

  • happy path: issue has no existing subtasks, reviewers do not change, and the issue transitions to the target status one time
  • One, or more, subtasks already exist for the "reviewer"
  • A reviewer is added / removed after the transition to the target status
  • The issue leaves the target status, and returns to it again later
  • etc.

 

Kind regards,
Bill

Martin Vali
Contributor
October 22, 2024

This is where i do not know how to continue

image.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 22, 2024

Please see the article I linked to for advanced branching; your rule should use that to iterate over the users in the field rather than use For Current Issue.

Martin Vali
Contributor
October 24, 2024

I understand that, that was created by AI.

 

I have spent now hours looking through the pages and youtube videos but I have not understood that logic just yet. You can call me slow learner.

I don't have much more time to spend on that, so I ask help again and hope you have understanding enough to help me out

As I have understand the logic is as follows:

1. I have to look how many users are in the field "reviewers" 

2. Create as many subtasks as was the count of reviewers

3. Assign each subtask to unique reviewer

image.png

I don not yet know which branching to choose @Marc - Devoteam can you help me out if @Bill Sheboy is busy

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2024

HI @Martin Vali 

Use the Advanced branching option.

in the Advanced branching, set the variable to {{issue.customfield_<id>}} ,where <id> is the number of the custom field.

how-to-find-any-custom-field-s-ids 

and set a name (to be used as variable if needed)

Then use the Create Issue action and set it to create a sub-task, set the fields you want to populate.

Use the variable, let's say as the reporter of the issue, you can set this to assignee field or elsewhere.

Example:

Screenshot 2024-10-24 at 11.21.34.pngScreenshot 2024-10-24 at 11.21.27.png

I hope this helps and solves your issue

Like Martin Vali likes this
Martin Vali
Contributor
October 24, 2024

@Marc - Devoteam It worked, but how to assign the subtask

image.png

Like Madis Raimla likes this
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2024

Hi @Martin Vali 

Set the Parent field to "Trigger Issue" and if you want to use the summary from the parent issue.

Use the smart value {{triggerIssue.summary}}

Like Martin Vali likes this
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2024

Hi @Martin Vali 

You edit your previous comment I see, was just replying.

Also set the assignee field in the create issue action.

Set the assignee field to {{name_of_the_advanced_branch}}, I thought I saw {{Reviewer}} in your previous screenshot.

Or see my screenshot and see the Reporter field.

Like Martin Vali likes this
Martin Vali
Contributor
October 24, 2024
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2024

Hi @Martin Vali 

In the create issue.

If the assignee of the sub-task needs to be one of the users mentioned in the reviewers (multi-select field), set the Assignee to {{Reviewers}}.

This is the name_of_the_advanced_branch.

I would remove the reporter field from the fields to set.

Like Martin Vali likes this
Martin Vali
Contributor
October 24, 2024

Thanks @Marc - Devoteam You helped me a lot. Got it working and learned at the same timeimage.pngimage.pngimage.png

Like Marc - Devoteam likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2024

Hi @Martin Vali 

As some recommendations to help with your future community questions...

 

This is the Atlassian Community.  It is a place for people with similar interests to learn and collaborate with one another.  It is not the Atlassian Support team's response portal.  Thus, community members will respond to posts / questions when they are available.  If you have more urgent needs than can be answered by the community I suggest first asking your Jira Site admin for help.  If they cannot answer your questions, work with them to contact the Atlassian Support team to create a ticket: https://support.atlassian.com/contact/#/  

 

Next, I am unclear what you mean by your earlier post:

I understand that, that was created by AI

The how-to article I provided was written by a person on the automation team for Atlassian.  It does not appear to be written by any bot.  Would you please clarify what you meant by your post?  Do you mean your starting point rule was written by Atlassian's (or some other) bot?  Thanks!

 

Finally, successfully using Jira Automation requires learning and experimentation.  When one just uses rules created by others without understanding them, one will be unable to maintain or improve them.  And so I would not advise trying to implement urgent needs with automation rules or rush to implement them for production project needs.

 

Kind regards,
Bill

Like Marc - Devoteam likes this
Martin Vali
Contributor
October 24, 2024

Hi @Bill Sheboy I was aware what you tried to made me invent bicycle and sometimes I agree with your way but on other hand The principle of teaching is to enable others to move faster forward.

 

I did not have time currently to invent bicycle and that's why I was annoyed with your answer and were little sarcastic :).  And I am Jira Site admin, so this is a tricky part here.

The AI reference was to my automation - it was created by Jira AI and obviously it was wrong.

Examples are the best way to learn because it uses something you already understand. And not using Automation was currently out of the question as I have to do 1000 isseus

 

Cheers

Martin

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events