Can't update (PUT) issue priority with curl

mcelo March 6, 2018

With this curl

curl -u user:password -X PUT --data "{\"update\":{\"priority\":[{\"set\":{\"name\":\"Bassa\"}}]}}" -H "Content-Type: application/json" http://myserver/rest/api/2/issue/MYISSUE-142

... I get

{"errorMessages":["Internal server error"],"errors":{}}

BUT, if I change the priority of the issue (MYISSUE-142) using the gui, after that the same curl call works as expected.

Why? How can I update the issue without having to manually "initialize" the priority?

Thanks,
Marco

2 answers

0 votes
Erik Falke November 23, 2019

Hi Marco,

were you able to solve the problem meanwhile?

I got exactly the same issue. Updating priority through the api works like a charm, but only if the priority field was set before. Updating an issue which has priority "null" (which also means it is not visible in gui) results in a http 500 server error.

 

Thanks,

Erik

0 votes
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2018

Hi! 

 

Have you check from developer tools generated curl link? 

 

Looks like everything is ok.

 

Cheers,

Gonchik Tsymzhitov

Suggest an answer

Log in or Sign up to answer