Forums

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

Create Issue with the same status

aas
Contributor
November 13, 2019

Hello everybody! I need to create issue from one instance of jira to another via REST API and the main problem is that I can't create issue with the same status. By default issue status is New Issue in first jira, issue status of created via REST is In Progress.  In create issue description here https://docs.atlassian.com/software/jira/docs/api/REST/8.4.3/#api/2/issue-createIssue I couldn't find fields status or smth like that.

Will be glad for any help.  

1 answer

1 accepted

0 votes
Answer accepted
Nir Haimov
Community Champion
November 14, 2019

Hi,

When you create issue via REST API the issue will always be at it first status "New".

If you want it to be in "In Progress" you have to transition the issue to that status, using this:

POST /rest/api/2/issue/{issueIdOrKey}/transitions
Body of your post will be: "transition": { "id": "5" }

 *replace 5 with your relevant transition id

aas
Contributor
November 14, 2019

In my case when I create issue via REST all issues are in status In Progress. I suppose it depends on which workflow associated with issue.

But generally you mean that if I want to create issue with the same status first I have to create issue and then make a transition?   

Nir Haimov
Community Champion
November 14, 2019

Exactly :)

Suggest an answer

Log in or Sign up to answer