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

Simple automation is running too often

Randy O_Neal
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2022

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
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.
January 27, 2022

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

Randy O_Neal
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2022

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 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
Randy O_Neal
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2022

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

Like Bill Sheboy likes this
0 votes
Answer accepted
Peter DeWitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 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
AUG Leaders

Atlassian Community Events