Error after update uri jira Integration

My company had a jira integration with java / spring boot
and thats worked very well but after updating the
uri of integration one field of type

"customfield_11333" : {
      "type" : "doc",
      "version" : 1,
      "content" : [ {
        "type" : "paragraph",
        "content" : [ {
          "type" : "text",
          "text" : "test"
        } ]
      } ]
    }

showed an error:

{
    "errorMessages": [],
    "errors": {
        "customfield_11333": "The operation value must be a string"
    }
}

but we don’t update the type of field, what could it be?

@guidiego,

I’m not sure what you mean by “updating the uri of integration”. Could that also be a switch from Jira Server to Jira Cloud? If so, that could explain how the field type could have changed. Based on the little context you have provided, I can’t really say how the field type changed; however, I do recognize that as Atlassian Document Format (ADF), which is used for “Text Field (multi-line)“ (also known as textarea inside the REST API).

The error message is exactly correct. While ADF is itself a JSON document, the value must be encoded as a string inside JSON for Jira.

  1. For the value you wrote, let’s first remove unneeded whitespace (to reduce the what needs to be encoded):
{"type":"doc","version":1,"content":[{"type":"paragraph","content":[{"type":"text","text":"test"}]}]}
  1. Now encode as string by adding double quotes and escaping other quotes, slashes, and whitespace (I’m sure there’s an appropriate library available for Java/Spring):
"{\"type\":\"doc\",\"version\":1,\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"test\"}]}]}"
  1. Send the string as the custom field value:
"customfield_11333" : "{\"type\":\"doc\",\"version\":1,\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"test\"}]}]}"

In this case, could I test via postman? Using "customfield_11333" : "{\"type\":\"doc\",\"version\":1,\"content\":[{\"type\":\"paragraph\",\" content\":[{\"type\":\"text\",\"text\":\"test\"}]}]}"

The uri change that I commented refers to the request address.
for example, before was :
https://test.atlassian.net
Now:
https://testCars.atlassian.net

thanks for the feedback

@guidiego,

Yes, that sure is cloud to cloud. Are you sure you didn’t update the field type? If maintaining identical configurations is important to your organization, you might want to check out one of the admin apps for configuration management like Revyz or Salto.

In any case, yes, you should also be able to confirm the fix via Postman.