Update value for custom field in another project

J_R_ Rasberry April 8, 2024

I'm trying to create a global automation rule based on field value changing.

I currently have three custom numerical fields in Tasks that can be updated in Project A. I have an automation that creates a sum of the values from these fields across all child Tasks and updates the value in three other custom numerical fields for the parent Epics in Project A.

I am looking to have an automation that will take the current values of those fields based on the fields updating and place them in a short text field of a Parent Initiative in Project B. 

Every test I have run will not execute the update of the text field in Project B. I updated the original automation to place those values in the specific order needed within the same short text field in Project A to make sure I had format correct and this worked without an issue.

How can I get the Global rule with the 'Multiple Projects' Scope and both projects properly selected to execute the field update across projects?

1 answer

0 votes
Matt Parks
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.
April 8, 2024

It sounds like you need a second automation rule that triggers when any of the three custom numerical fields is updated. I think you would need to select the checkbox on this rule to allow it to trigger from other rules, since those fields are going to be updated from an Automation rule, not from the fields being updated as because someone updated them directly.

If that doesn't get you what you're looking for, please include screenshots of the automation rules.

J_R_ Rasberry April 9, 2024

@Matt Parks 

:facepalm: 

I forgot to select that box. I corrected that but now the automation only works partially. The short text field updates with part of the text and the correct formatting but does not carry over the values of the custom fields. Any thoughts as to why? Screenshot 2024-04-09 at 9.15.12 AM.pngScreenshot 2024-04-09 at 9.15.39 AM.png

The custom fields are present in project A and are not present in project B.

I kept the other rule for solely project A turned on to make sure the data lines up and it pulls the values successfully there but not in project B.Screenshot 2024-04-09 at 9.16.28 AM.png

J_R_ Rasberry April 11, 2024

@Matt Parks Any thoughts as to why the values of the fields aren't generating?

Matt Parks
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.
April 11, 2024

I admit that I can't tell exactly what is going on with your automation rules, but this is my understanding of how you want everything to work:

1. One (or more) of three values in a Task in Project A is updated

2. Equivalent fields on the parent Epic (which is always in Project A?) are updated to include the totals of these fields across all children of the Epic

Step 2 occurs as part of an Automation rule which is triggered by Step 1 happening

What you want to see, which isn't happening yet, is for a separate text field in Project B to be updated when any of the three fields are updated on the Epic as part of the first Automation rule. The update will happen as part of a second Automation rule.

 

If that understanding is correct, what are you seeing in the Audit Log of the second Automation rule? Does it trigger when one of the epic fields is updated? Are there any error messages?

J_R_ Rasberry April 11, 2024

@Matt Parks you are correct in the summary.

Before I selected the box as you pointed out in the first response I didn't receive any updates in the Audit Log when I would test, the rule simply was not firing at all. 

Once I updated the rule details and included the check box I receive a Success status for each run. It successfully puts the non-field text in the right field within Project B but it is not filling the values of the three Total Fields from project A (as shown in the screenshots I provided)

I'll also include a screenshot of the audit log so you can see.Screenshot 2024-04-11 at 12.07.25 PM.png

Matt Parks
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.
April 11, 2024

I haven't played around much with the branching, but is it possible that, since you're using {{issue.customfield_10906}} that it's looking for the value of that custom field on the issue where the second rule is triggering (i.e. the epic in Project B) instead of the issue in Project A?

J_R_ Rasberry April 11, 2024

That is what I was starting to think. I added both projects in question as the scope under the Global Rules section so I was hoping from all I looked at that the highest level parent (project b) would be able to pull the values from it's child epic (project a) from the rules of the branching but it doesn't seem to work as intended. Any other thoughts on how to achieve this type of action?

J_R_ Rasberry April 12, 2024

@Matt Parks  after trying a few other ways to get this to work I just got it to successfully bring the values over!

I was re-reading the info in the Branch Rule/Related issues info and noticed this portion:

"You can however also access the issue that triggered this automation rule via {{triggerIssue}} (e.g. {{triggerIssue.fields.summary}})."

I updated my smart value from {{issue.customfield_10196}} to {{triggerissue.customfield_10196}} and that did it!

Suggest an answer

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

Atlassian Community Events