Forums

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

Automation Not Triggered for All Issues Imported

Sage Lesko October 10, 2023

Our team-managed project has a list of issues that are created monthly. As we work through them, eventually we receive a payment from manufacturers. We want to record these payments in Jira using an CSV upload.

I've created a new issue type that when imported via the CSV, links to an existing issue (Epic) and updates a custom field within the Epic.

I've been successful if I do a smaller amount of payments to upload, but the automation doesn't work completely when a larger amount of issues are uploaded. I've been testing uploading larger and larger number of rows, and interestingly enough, came across one test that had half of the issues link properly to the epics and updated the custom field, while the other half uploaded and link properly, but did not update the custom field on the epic.

This is my CSV file, where the first 3 issues highlighted in blue did not update the fields in the Epic:

image.png

 

This is the audit log of the automation. I've expanded one of each type of automation: one that was successful and one where "no actions were performed":

image.png

This is an epic that shows the linked issues and updated the Payment Amount custom field:

image.png

image.png

 

This one shows that it was linked successfully to the epic but the Payment Amount field was NOT updated:

image.png

Clicking on the imported issue the Payment Amount was uploaded successfully:

image.png

 

3 answers

1 accepted

0 votes
Answer accepted
Sage Lesko October 11, 2023

Here's the solution I found:

1. To update the imported issue to a new status

71841201-cee0-44ab-a32f-e71c88d9b5f7.jpg

2. Updating the related issue when the status is transitioned and checking the box for allowing other rule actions to trigger this rule.

image.png

 

Thank you everyone for all of your help!

1 vote
Trudy Claspill
Community Champion
October 10, 2023

Hello @Sage Lesko 

When asking for help related to an Automation rule not working as you expect, it is necessary for us to see the rule to try to debug it. Please provide screen images showing the details of the rule.

Sage Lesko October 10, 2023

Hi, I answered above instead of replying but here is the outline for the Automation:

image.png

Issue Created:

image.png

 

Issue Type Condition:

image.png

 

Branch rules for Linked Issues:

image.png

 

Then Edit Issue:

image.png

Trudy Claspill
Community Champion
October 10, 2023

How is the link created between the newly created issue and the Epic?

If that is part of the CSV upload it is likely that the issue creation action is completed before the Link is created, and the Link doesn't exist at the time when the rule is run.

Try adding a Re-fetch action between the Condition and the For branch. That will slow down the rule a tiny bit and perhaps allow enough time for the Link to be created before the For branch runs.

Sage Lesko October 10, 2023

Correct, the link is created in the CSV upload.

The upload map fields are as follows (screenshot is from another Jira project, so ignore the different Project Key):

image.png

I tried added a re-fetch action in the automation, as seen here:image.png

All are now showing as "successful", but you can see that the automation still didn't "kick in" until the final three rows of the upload file:

Automation Audit Log:image.png

Automation expanded to show where automation did not update epic successfully: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 10, 2023

Hi @Sage Lesko 

Adding to the ideas from Trudy...

First, I suggest moving the Re-fetch Issue action to immediately after the Issue Created trigger.  That is a common work-around for timing problems caused by that trigger firing so quickly.

Next, this seems like a timing / race-track condition.  Would you please post images showing the issue history (including the create) for one of the issues that worked and one that did not?  I wonder if those will show a non-trivial time difference between the create and the linking.

Kind regards,
Bill

Like Sage Lesko likes this
Sage Lesko October 10, 2023

Hi Bill,

Here is one that was successful:

Imported Issue:

image.png

Linked Issue:

image.png

 

"Unsuccessful":

Imported Issue:

image.png

Linked Issue:

image.png

 

I updated the order of operations for the automation rule to re-fetch immediately after the Issue Created step, and was still unsuccessful for all imported issues.

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 10, 2023

Yup, we see two different entries as the link happens separately.

For the created issue, if you hover over the values in the issue history for created versus linked, how much time difference do you see?

UPDATE: I just tried this for an on-line (not imported) issue create and even that one shows two different history entries.  (Seems like a design choice / defect to me.)

So a work-around for this may be to rethink your rule to use a different trigger (plus some conditions) so the Issue Linking is what triggers the rule.

Like Sage Lesko likes this
Sage Lesko October 10, 2023

Hey Bill,

There seems to be negligible time; no seconds are included if I click on the time, only up to the minutes (sorry, didn't realize I could do that before!).

I will have to re-think the automation like you suggested.

I really appreciate the help I've received from you and Trudy! Thank you!

Like Bill Sheboy 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 10, 2023

Even less than a second difference could cause a problem for the rule, so the trigger change will help.

Jack Brickey
Community Champion
October 10, 2023

i wonder if a manual rule approach might work?

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 10, 2023

Hi, Jack!  That would work, although I believe the idea was to have the issue import drive the updates automagically...without the manual actions.

Jack Brickey
Community Champion
October 10, 2023

yes for sure but was wondering if the import might be the culprit. a manual test would confirm maybe. Too, given that the CSV import is manual, the additional step of "run rule" would not be too expensive.

Sage Lesko October 11, 2023

For anyone else curious or looking for a similar solution, I was finally successful by using two automations: 

1. To update the imported issue to a new status

71841201-cee0-44ab-a32f-e71c88d9b5f7.jpg

2. Updating the related issue when the status is transitioned and checking the box for allowing other rule actions to trigger this rule.

image.png

 

Thank you everyone for all of your help!

Like Bill Sheboy likes this
0 votes
Sage Lesko October 10, 2023

Hi, here is the outline for the Automation:

image.png

Issue Created:

image.png

 

Issue Type Condition:

image.png

 

Branch rules for Linked Issues:

image.png

 

Then Edit Issue:

image.png

Suggest an answer

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

Atlassian Community Events