Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,108
Community Members
 
Community Events
184
Community Groups

Jira Automation - Tigger "Create or Update" option?

Hello!

 

I would like to know if a trigger exist which includes BOTH 'Create or update issue'.

 

So it will trigger if a subtask is created, OR if a subtask is updated? Right now I have to maintain 2 sets for automations for both scenarios!

 

Thanks

2 answers

1 vote
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.
Apr 22, 2022

Hi @Sion Dinh 

No, there is no such trigger for automation rules.

If your rule maintenance is cumbersome, consider creating three rules:

  1. Trigger on Create Issue, and make an update which can trigger rule #3
  2. Trigger on Update Issue, and make an update which can trigger rule #3
  3. Trigger on the condition created by rules #1 and 2, and perform the work necessary for both.  For this rule to be triggered by other rules enable the "Allow Rule Trigger" option in the details.

Kind regards,
Bill

Thanks Bill! Will give this a try!

Like Bill Sheboy likes this

I stumbled upon similar problem where I wanted to run trigger Field value changed and then in subsequent if/else conditions check for whether the change in field value was during issue creation or update. I solved it by comparing dates for issue created vs. now. This could help in your use case @Sion Dinh.

 

This condition will run when change was made during issue creation:

Screenshot 2023-05-18 at 17.17.12.png

 

You can verify that by logging action:

Screenshot 2023-05-18 at 17.17.25.png

 

Note: the solution does not guarantee 100% accuracy. If Jira slows down for some reason and fires the automation rule more than a second after issue was created, it may fail. So to prevent that you can further consider comparing the two timestamps (now and created) by calculating the difference between them and setting acceptable delay, e.g. 5000 milliseconds (5 seconds). Use {{[date1].diff([date2]).[unit]}} to do that. More documentation here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

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.
May 19, 2023

Hi @Krzysztof Achinger 

Such a rule could also run into problems when the automation engine is impacted, such as by an outage.  In this case, some rules will run at an indeterminate time in the future and some will not run at all.  (This has been confirmed by Atlassian staff in other community posts.)  There really is no way to know/guarantee when a rule will run, and so relying on {{now}} to decide if a create or update happened could be problematic.

Kind regards,
Bill

Indeed, that is what I described in a "note" after screenshots.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events