Forums

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

Link tasks in automation via comparing custom fields

Tobias Koch December 14, 2022

Hello community,

we have the following problem, maybe someone can help us.

In our project, a ticket with the issue type RFQ is created via automation. We want to link this created ticket to another (already existing) ticket with the issue type Account via automation. 

To do this, we have built an automation that compares the values of two custom fields stored in both RFQ and Account. If the value in these custom fields is identical, the two tickets should be linked.

Unfortunately, all tickets of the issue type account are linked, not just the one that has the same value in the custom field.

Does anyone have a suggestion on what might be the problem here? See the automation below:

Bildschirmfoto 2022-12-14 um 12.35.26.png

3 answers

1 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.
December 14, 2022

Hi @Tobias Koch 

I believe the issue is your comparison is comparing the issues in the branch to themselves, rather than to the trigger issue.

If you want to compare to the trigger issue, change your advanced compare to testing {{issue.customfield_11019.value}} equals {{triggerIssue.customfield_11019.value}}

Or better still...change your branch JQL to find only what you want:

project = TRAV AND issueType = Account AND name-of-your-custom-field = {{triggerIssue.customfield_11019.value}}

 

Kind regards,
Bill

Tobias Koch December 14, 2022

Hi @Bill Sheboy thanks for the tip! I already tried it with the JQL branch you recommended.

Bildschirmfoto 2022-12-14 um 18.00.59.png

Unfortunately, I receive an error when the automation runs. Do you have a guess why that could be the case?

Bildschirmfoto 2022-12-14 um 18.05.58.png

The updated compare is also not working. The problem is, that only one of the Accounts (from TRAV-360 to TRAV-338) has the same value as the RFQ, however, all of them pass?

Tobias Koch December 14, 2022

As you can see, only one of the Accounts has the correct value in the Custom Field Salesforce Account ID, however, both of them are linked.

Bildschirmfoto 2022-12-14 um 18.12.34.pngBildschirmfoto 2022-12-14 um 18.12.51.pngBildschirmfoto 2022-12-14 um 18.13.03.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.
December 14, 2022

Let's pause to check two things:

(1) There is a known issue where the Issue Created trigger can fire very quickly...so quickly that the data is not ready for the rule to use!  The work-around for this is to add a Re-fetch action immediately after the trigger and before other steps.  That will slow down the rule and reload the data before proceeding.

(B) Are you certain you have the correct custom field id value?  Perhaps writing that to the audit log in the rule will confirm what you expect.

Vedant Kulkarni_Trundl
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.
December 15, 2022

@Tobias Koch , +1 to @Bill Sheboy  view. By looking at the status "No Action Performed" in the logs, seems like Account issues and RFQ issues are being created at the same time

which does not give enough time to execute the rule properly.

You can validate these two things and come back again with your findings.

Tobias Koch December 15, 2022

@Vedant Kulkarni_Trundl this can't be the case. The account is created when the Epic is created, which also created other issues, like a Line-Item. An RFQ is created when the Line-Item is transitioned into the In Progress status. Or am I missing something here?

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.
December 15, 2022

Hi, Tobias.  What happened when you tried adding that Re-fetch action I suggested?  Thanks!

Vedant Kulkarni_Trundl
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.
December 15, 2022

@Tobias Koch , can you also validate the custom field ids?

Also, try interconnecting the automation rules if rule actions are dependent.

Tobias Koch December 19, 2022

I was able to fix it now with the {{issue.customfield_11019}} in the first field of the If: Compare two values and {{triggerissue.customfield_11019}} in the second field.

Bildschirmfoto 2022-12-19 um 12.04.15.png

0 votes
Tobias Koch December 14, 2022

Hi @Vedant Kulkarni_Trundl

Bildschirmfoto 2022-12-14 um 18.05.58.png

This is what I see in the Audit Log. The problem is, that only one of the Accounts (from TRAV-360 to TRAV-338) has the same value as the RFQ, however, all of them pass.

0 votes
Vedant Kulkarni_Trundl
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.
December 14, 2022

@Tobias Koch , I have created a similar rule in my test instance and tried it, it worked as expected. Can you check your audit logs

audit_log_automation1.JPG

Suggest an answer

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

Atlassian Community Events