Forums

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

How to update the resolution field via the API

David Whitlock July 27, 2023

I am using a new workflow that has been in use for several months now. The issue I am encountering is that I did not add a post function to update the resolution to Done once the issue was transitioned to Done. I currently have hundreds of issues that are done with an Unresolved (empty) resolution. I was trying to do a Bulk change operation to update the resolution field for these issues but see that the operation does not support this. I checked using my API script to update the issues but I am getting this error:

Error Code 400::{"errorMessages":[],"errors":{"resolution":"Field 'resolution' cannot be set. It is not on the appropriate screen, or unknown."}}

This is the payload I am putting to the endpoint:

{"fields":{"resolution":{"value":"Done"}}}

Thanks in advance

1 answer

0 votes
Nic Brough -Adaptavist-
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.
July 27, 2023

The API respects the settings you have for a project and issue type.

As you have got your edit screen correctly configured (meaning it does not contain the resolution), the API is doing exactly what it should do - not changing a field that is not editable.

First, fix the workflow - add that "set resolution" post-function, or add the resolution to the "close" transition screens.

Second, fix the broken issues:

  • Book a low-use time that you can do this (you don't want your people editing issues during the fix)
  • Add the resolution field to the edit screen
  • Search for "resolution is empty and status is closed/done/ended etc"
  • Bulk edit the issues returned, setting the resolution
  • Remove the resolution field from the edit screen

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events