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,457,456
Community Members
 
Community Events
176
Community Groups

Simple automation is running too often

I have a simple automation; it is running far too frequently and is occasionally erroring, and I'm new enough to this I can't see why.

The automation is triggered when an issue is transitioned to Done.  For the parent, if the issue is a particular custom issuetype "Deployment Activity" and its status is not Done, and its subtasks' status(es) are Done, then transition the issue to Accepted.

 

As it is, this runs every time anything transitions to Done, and the conditional check of the issuetype = "Deployment Activity" does not seem to prevent the automation from checking all subtasks, regardless of the issuetype parent.

 

Once all the appropriate conditions are met, the correct issues are being transitioned to Accepted, but it feels like there should be a lighter-weight solution.  Any suggestions for an automation neophyte?

Automation.jpg

2 answers

2 accepted

0 votes
Answer accepted

Hi @Randy O_Neal 

You note that your rule occasionally erroring.  Would you please show an image of the audit log details and describe the symptom/error you observe is happening?  Thanks!

Regarding your rule structure question, you could merge most of your tests on the parent into a single JQL statement, and use a JQL branch instead.

Kind regards,
Bill

I've only received this error 3-4 times, and it's always been when evaluating standard story issuetypes:

Branch rule / related issues
Error searching for related issues. This is most likely because the following issues don't have a related issue of the type you specified. Try narrowing your search to only include issues that contain links to related issues:
RACE-9210: "(((key = ) AND (issuetype = "Deployment Activity")) AND (key != RACE-9210)) AND (project in (10060,10061))" - Error in JQL Query: Expecting either a value, list or function but got ')'. You must surround ')' in quotation marks to use it as a value. (line 1, character 10)

 

I'm hoping the change I've made to further restrict to "Parent Matches" as mentioned below will fix the issue, but I'd like to understand what the error is conveying.

Peter DeWitt Community Leader Jan 27, 2022

@Randy O_Neal , my guess is that the error occurs when there is not a parent issue for the issue that was responsible for triggering the automation.

 

-pjd

Like Bill Sheboy likes this

That would make sense... thanks for the assistance.  Thanks all!!

Like Bill Sheboy likes this
0 votes
Answer accepted
Peter DeWitt Community Leader Jan 27, 2022

@Randy O_Neal , try adding an additional condition after your When: component like this:

2022-01-27_14-59-41.png

This will at least stop the automation from running if the parent does not exist or is of a different issue type.

 

-pjd

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events