Jira Automation rule stopped working without any changes
Asked by Nik Zingg:

Hey everyone,  
We have an automation rule in Jira Service Management which automatically sets the customer in a custom field within the issue:

![jira-automation.png](/t5/image/serverpage/image-id/310523iFCC186F7AF665296/image-size/large?v=v2&px=999 "jira-automation.png")

Works roughly as followed (btw. "Kunde" = "customer" in German):

* Creates a variable with the customer name which gets extracted from the issue summary using the split function
* Performs a lookup for the customer object in Jira Assets based on the previously set variable
* If the return value of the lookup is not empty, sets custom field "CSIC Kunde" based on the return value "{{lookupObjects.id}}"

The log actions have only been added recently to confirm the results of the split function and the Asset object lookup - both of which work as intended.

The rule has worked perfectly fine up until a few days ago. Since then, the following error gets thrown for the last step "edit issue fields" (without any changes to the rule from our side, notably):

```
EDIT ISSUE
An error occurred while requesting remote information
Bad Request
No fields or field values to edit for issues (could be due to some field values not existing in a given project):
<Issue Number>
```

The custom field to be edited exists within the issue type and the name is correct. What could potentially be the problem here? Any guidance on this is appreciated!

Cheers,  
Nik


Answers:
author: Trudy Claspill
body: Hello [@Nik Zingg](/t5/user/viewprofilepage/user-id/5445206)

Welcome to the Atlassian community!

Is this for a Team Managed project or a Company Managed project?

Is the field available in the issue screen? Can it be edited manually?

Does the automation scope include more than one Project?

Is there more than one field in your system with that same field name? You can check that by going to the Issues \> View All Issues screen, advanced view, and start typing in the name of the field. Jira will show you a list of potentially matching field names. Check if the list includes more than one exact match.

comments: author: Nik Zingg
body: Hi [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)

Thanks for responding!

Here's the requested information:

* The project is company-managed.
* The field is available in the issue screen and can be manually edited - there is a dropdown menu for choosing the customer object from Jira Assets which works fine.
* The automation scope is limited to that specific project.
* I can only answer this for our specific project as I'm only a project admin and not a global Jira admin: there is only one field with that name in the project scope (appears in 9 screens). It is, however, very unlikely, that the same issue field appears in antoher project - but I might want to double check that.


author: Trudy Claspill
body: One way to check if there are multiple fields with the same name is:

Go to the Filters \> View All Issues screen, advanced view, and start typing in the name of the field. Jira will show you a list of potentially matching field names. Check if the list includes more than one exact match.

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

Who is the rule Actor? Does that Actor have the Edit Issue permission within the project's Permission Scheme?

Side note: You mentioned that your question is about a Jira Service Management project, but you posted it in the Jira Work Management forum. Work Management is a different type of project. There is a forum specifically for Jira Service Management related questions here:

<https://community.atlassian.com/t5/Jira-Service-Management/qa-p/jira-service-desk-questions>


author: Nik Zingg
body: Sorry, my bad for choosing the wrong Atlassian product. It's Service Management as you correctly pointed out - might have misclicked when creating the post.

I double checked the issue fields and I can confirm that there is only one field with that name - so no potential name collisions in other projects.

The actor is the "Automation for Jira" user which should have sufficient permissions to edit issues. We also have further automations for editing issues (posting comments, editing issue summary, set assignee etc.), all of which are using this user as the actor as well. All of the other rules work fine.


author: Trudy Claspill
body: Hello [@Nik Zingg](/t5/user/viewprofilepage/user-id/5445206)

What is the field type for the CSIC Kunde field?

I found a few other posts that mention this error message. Do any of these help solve your scenario?

<https://community.atlassian.com/t5/Jira-Service-Management/How-to-fill-insight-custom-field-with-insight-object-using/qaq-p/2016947>

<https://community.atlassian.com/t5/Jira-Service-Management/How-to-update-Insight-custom-fields-based-on-the-value-change/qaq-p/1721324>

<https://community.atlassian.com/t5/Jira-Service-Management/Automation-to-update-multiple-asset-object-fields-based-on/qaq-p/2517617>

<https://community.atlassian.com/t5/Jira-Service-Management/Trying-to-set-a-field-in-a-ticket-in-JSM-to-an-object-from-our/qaq-p/2495344>


author: Nik Zingg
body: The field type is "Advanced field".

Also, thanks for pointing out the additional posts. Some of them I already checked out - we have not tested the idea about using AQL directly yet, but could potentially work.

However, one of our team members actually managed to get the automation rule back to working. Instead of directly referencing the field we now reference the field via the ID (Edit issues \> More options \> Additional fields) using the following logic:

```
{
"fields":{
"CSIC Kunde":[{ "id":"8b391a53-[...]:{{lookupObjects.id}}"}]
}
}
```

I don't know if that is the best practice solution, but it works again which is the most important thing :)


Tags: automation

cloud

jira-service-management

jira-service-management-cloud