Update both issue type and fields for Jira issue

Arthur Kashapov April 14, 2021

How can I update issue type field and simultaneously (in the same request) update another field using Jira Cloud REST API?

For instance - I've got 2 issue types:

  1. Task that does not have priority field
  2. Story that has priority field

The problem is that when I send a request to the given endpoint to change the type of an already existing issue from Task to Story and pass the particular priority, I'm provided with the error in the response.

"errors": { "priority": "Field 'priority' cannot be set. It is not on the appropriate screen, or unknown." }

Jira Cloud REST API endpoint and payload:

PUT /rest/api/3/issue/{issueIdOrKey}

Screenshot 2021-04-14 135909.png

1 answer

0 votes
Warren
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.
April 14, 2021

Hi @Arthur Kashapov 

I suspect that you may have to do this in 2 separate calls i.e. first change the issuetype and then set the priority.

Have you tried setting the priority of an existing Story just to confirm that it works correctly?

Arthur Kashapov April 14, 2021

Hi. Yes, we've already tried and in separate calls it works fine. The drawback is obvious, since we have to either send 2 synchronious requests or work around asynchronious ones and I hoped that there was another solution. Nevertheless, thanks for the response.

Suggest an answer

Log in or Sign up to answer