Forums

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

Setting my rule to only run once

Becky McGrattan June 30, 2023

Hello,

Screenshot 2023-06-30 at 15.43.29.png

This is my first automation rule triggered on a status change.  If the status changes to Ready for PI event I want 3 sub tasks to be created.

 

This is all working fine until I try and add conditions so that the rule only runs once.

I have tried adding a comment saying "3 sub tasks added by automation" and searching the Issue !~ "3 sub tasks added by automation" in a branch after the status check

I tried setting an entity property and searching for that beforehand 

 

If there is a straightforward method I am missing please advise, help appreciated :) 

3 answers

1 accepted

0 votes
Answer accepted
Rudy Holtkamp
Community Champion
July 3, 2023

Hi @Becky McGrattan ,

For status changes you are better of to use the trigger "Issue transitioned".

With this trigger you can specify you 'To status'. So it will only trigger when an issue will go to this status. In the example below I used 'In progress'.

image.png

Note that if you can revisit the status via the workflow another 3 subtasks will be created, so you might want to use a related issue condition, like below.

image.png

This will prevent the creation of new sub-tasks if they are already present.

Becky McGrattan July 6, 2023

Apologies for late reply, I think the first part will definitely work.

 

We will create a manual Tech design sub task before the Ready for PI event, can I run the check for specific sub tasks? 

 

Thank you for your answer 

Becky McGrattan July 6, 2023

I sussed it thank you: 

 

Excluded titles:

summary ~ "title1" OR summary ~ "title2" OR summary ~ "title3"

1 vote
JM Perrot
Community Champion
June 30, 2023

Hello @Becky McGrattan 

I can suggest you to create a numeric custom field that you will add in hidden fields on your issues types. 

Like that you can use it like a counter in your rule. You just have to add a condition "If counter is empty"...

And add an action item to set up the counter with a value.

With this configuration each ticket can trigger the rule only one time and if you need to retrigger the rule, you ust have to clean up the field.

Regards,

JM

0 votes
Evgenii
Community Champion
June 30, 2023

Hi, @Becky McGrattan 

In trigger you can select from and to statuses, so, you can limit that only needed statuses will trigger rule.

Suggest an answer

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

Atlassian Community Events