Forums

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

PUT rest/api/2/issue/ 500 error. Jira Rest API Error

Tronikel August 12, 2021

Hello,

I’ve encountered a problem when calling PUT /rest/api/2/issue.
Jira Cloud responds with 500 and

{
  "errorMessages": [
    "We couldn't save your changes. Copy your content, then try reloading the page."
  ],
  "errors": {}
}

 The field that I want to edit is an ace app Issue Field with type “rich_text”

insomnia.png

More context to this error:

So, I am building an ace app, which has a connect module → Issue Field:

issuefield.png

This field gets assigned/updated to a Jira Issue through my app, the request is shown below.

jiraput.png

Now is the interesting part:

When I call the PUT request for the first time (on an issue which does not have my field assigned) it updates correctly.

But when I change the value and call PUT a second time (the issue already had my field assigned) the error pops up.

And, also, when I call PUT with the same value as the first PUT, it works.

e.g.

  1. I create an Issue
  2. Call PUT, value get saved correctly
  3. Add a random letter to my current value at the end and call PUT, get error
  4. Remove my random letter at the end and call PUT, then it works

So my guess is that my field is like a read-only field which you can only set once

BUT, everything works if I change my Issue Field type from “rich_text” to “text”. Sadly, I can’t do that because the 255 character limit is too small for my needs because I’m storing stringified JSON in it.

Thanks in advance for your time & help!

2 answers

1 accepted

0 votes
Answer accepted
Tronikel August 16, 2021

Okay, so after like 3 days, without me doing anything, the problem disappeared, and I can edit the fields, strange.

But hey, it works now!

Tom Lister
Community Champion
August 16, 2021

I hate it when that happens

😂

0 votes
Tom Lister
Community Champion
August 13, 2021

Hi @Tronikel 

I am server based so I'm not sure if this applies to cloud in the same way...

Check if your field is on the edit page as this is checked by anything updating an issue.

"The fields that can be updated, in either the fields parameter or the update parameter, can be determined using the /rest/api/2/issue/{issueIdOrKey}/editmeta resource.
If a field is not configured to appear on the edit screen, then it will not be in the editmeta, and a field validation error will occur if it is submitted."

I'm wondering whether when a field has the same value as current Jira does not update so the call when the character is removed appears to work.

Tronikel August 13, 2021

Hi @Tom Lister

This is what I'm getting when calling /rest/api/2/issue/{issueIdOrKey}/editmeta:

firefox_DWTBfkrG1H.png

So, does this mean that I should be able to edit the issue field?

The full response is here, if it'll help: https://hastebin.com/agoluqozos.json

Thanks

Tom Lister
Community Champion
August 13, 2021

Hi @Tronikel 

Yes - if a field is in the edit metadata is should be updatable.

A 500 error code is usually a serious internal error in processing a request. Are you able to ask Atlassian to look at the logs for you and get more details. I think only site-admins, technical, or billing contacts on paid Cloud sites will have the ability to create such support requests. 

Bit stumped I'm afraid. I'll try a test on our server later.

Tronikel August 13, 2021

Hi @Tom Lister 

I'm not really sure, I'm doing this on my own personal free Jira instance

Suggest an answer

Log in or Sign up to answer