Automation Failing - Branched Rule to Update Same Fields in Linked Issues
Asked by Sarah Schindler-Williams:

I created a rule 3-4 months ago that worked great - automatically updating the same (custom) "Download Date" field type when that field was updated in a (renamed Datafile) Bug or Story type issue for all task type issues linked as "relates to" to the Datafile.

Last week the rule started failing and the only notes are below which is not accurate:

![7.10 Screenshot.png](/t5/image/serverpage/image-id/334747i04C86557F0DFEFDE/image-size/large?v=v2&px=999 "7.10 Screenshot.png")

I have checked that the issue types all do contain this field type and tried turning rule on and off, copying it, and also asking Atlassian AI to write a similar rule (came up with the same old rule) here it is: (redacted)

![screenshot 2 jira.png](/t5/image/serverpage/image-id/334748i57AB651119231B79/image-size/large?v=v2&px=999 "screenshot 2 jira.png")Any thoughts or help appreciated!


Answers:
author: Trudy Claspill
body: Hello [@Sarah Schindler-Williams](/t5/user/viewprofilepage/user-id/5082881)

Welcome to the Atlassian community.

What steps have you taken to determine that there are no other fields with the same name (X Download Date) and field type defined globally or within Team Managed projects?

comments: author: Sarah Schindler-Williams
body: thanks Trudy, the rule is limited to linked issues in the particular project, I did create the field and don't think it's used in other projects but will check, if it was copied in other projects how would I update the rule so that it worked again?


author: Trudy Claspill
body: Are the projects that use this field Company Managed projects or Team Managed projects.

Are there both Company Managed and Team Managed projects on your instance?

Can you navigate to the Custom Fields page and search for the field to confirm that another global custom field with the same name does not exist?

If multiple fields with the same name exist in the instance then you could use Advanced Field Editing with JSON in the Edit Issue step to reference the field by its unique ID and update it.

<https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/>


author: Sarah Schindler-Williams
body: it's a team managed project


author: Sarah Schindler-Williams
body: Looking at the custom field settings it is associated with the project's screen but under the Project listing this field now says "None" is this because Atlassian is in process of merging company and team managed projects?


author: Trudy Claspill
body: Hello Sarah,

So you defined a Global Custom Field, and pulled that into your Team Managed project? You did not define a Custom Field directly within the Team Managed project?

If so, then the Custom Fields screen does not seem to show that a Global Custom Field is being used in a Team Managed project.

What are the details of the Edit Issue step? How are you setting the value of that field?


author: Sarah Schindler-Williams
body: Thanks Trudy, I actually created this field within the Team Project, it was only ever used by this project (to my knowledge and based on current context screen) and the rule worked great up until about a week or two ago.

The edit issue step is set to copy the value of the Download Date field from the trigger issue (the Datafile type).


author: Trudy Claspill
body: Is it true that you see a field of the same name in the Custom Fields screen available at ...?

<https://yourURL/secure/admin/ViewCustomFields.jspa>

If so, can you click on the ... next to that field and hover over one of the options. At the bottom of your browser you should see a link that includes the field's ID. Make note of that field ID.

![Screenshot 2024-07-12 at 5.01.23?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/335401i40C6FC07E9088894/image-size/large?v=v2&px=999 "Screenshot 2024-07-12 at 5.01.23?PM.png")

You also said that you "created" the field within the Team Managed project. Within Team Managed projects you can create new fields that are specific to that one project, and you can reuse fields (that have a global context) that have been created in the Custom Fields page.

So, I think we need to confirm which field is actually being used within your Team Managed project.

Find an issue in the Team Managed project that has a value in that field. Use the information here to get the JSON output for all fields for that issue.

<https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/>

Find the field in that JSON output. Check the ID number associated with it. Compare that ID number to the ID number you found for the same named field in the Custom Fields screen. Are they the same or different?

If they are different, then your automation rule is likely getting "confused" because it is not sure which field you are actually trying to reference because there is more than one field in the system with the same name.

In that case the Automation Rule needs to reference the field by its ID. In that case you would have to use the More Options section of the Edit Issue action, and edit the field using the Advanced Editing with JSON capabilities.

<https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/>


Tags: cloud

jira-cloud