How to update a custom field in JIRA using the REST API?

I’m attempting to update a custom field named “resolution description” when I change the resolution to “fixed” in JIRA. I used the transition REST API call but it doesn’t seem to work as intended.

Here is the JSON string I used for the API call:

{
  "update": {
    "resolution_description": [{
      "add": {
        "body": "" + errors + ""
      }
    }]
  },
  "transition": {
    "id": "5"
  }
}

The variable “errors” holds a preset value. Can I update both the resolution description field and perform the transition in one API request?

Your JSON structure is mixing field updates with transition syntax wrong. Use the “fields” object for custom field updates during transitions, not “update”. The “add” operation you’re using is for array fields like comments or attachments - not text fields. For a simple text custom field like resolution description, try: {“fields”: {“customfield_XXXXX”: “your error message”}, “transition”: {“id”: “5”}}. Just replace customfield_XXXXX with your actual field ID. I’ve done similar integrations and this approach works reliably for updating text fields during workflow transitions.

You’re probably hitting a field mapping issue. JIRA’s REST API doesn’t use display names for custom fields - you need the actual field ID instead. Custom fields have IDs like “customfield_10001”, not “resolution_description”. Hit /rest/api/2/field with a GET request to grab all available fields and find your custom field’s real ID. Then switch your JSON structure to use “fields” instead of “update”: {“fields”: {“customfield_XXXXX”: “your error message here”}, “transition”: {“id”: “5”}}. Swap “customfield_XXXXX” with whatever ID you found. And yeah, you can definitely update custom fields and trigger transitions in one API call - it’s actually the better way to handle workflow transitions that need field updates.

check your field config - custom fields can be restricted during transitions. also, make sure the field’s visible and editable on the target status screen. i’ve had cases where the API call works, but the field won’t update due to screen config issues.