Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira Automation rule stopped working without any changes

Nik Zingg March 6, 2024

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

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

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 6, 2024

Hello @Nik Zingg 

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.

Nik Zingg March 7, 2024

Hi @Trudy Claspill 

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.
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2024

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

 

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

Nik Zingg March 8, 2024

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.

Nik Zingg March 11, 2024

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 :)

Suggest an answer

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

Atlassian Community Events