How to do a transition during bulk issue creation?

Arun Chittem April 7, 2020

I am creating bulk issues using jira rest and I am not able to set transition in that call. 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-bulk-post

But the doc says we can set transition during bulk creation.

image.pngattaching sample response from docs.

2 answers

1 accepted

0 votes
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 8, 2020

Hello @Arun Chittem ,

If I understand correctly you are able to bulk create issues using REST API but you cannot transition them. Is this correct?

If this is correct then can you kindly provide more details?

Specifically, we would like to know:

  1. The steps you are following
  2. The body you are sending to transition the issues
  3. What do you get as a response 

Actually, it would be best if you could run the REST API call in a terminal using Curl and paste the result in here making sure to remove the sensitive data (make sure to replace your real emails address, api token and site name with XXXX or random letters).

 

Cheers,
Dario

Arun Chittem April 9, 2020

Hi @Dario B

 

Thanks for the reply,

 

The below in the curl request:

curl --request POST \
--url 'https://team-1585739298180.atlassian.net/rest/api/latest/issue/bulk' \
--user '<<email>>:<<api token>>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"issueUpdates": [
{
"update": {
"worklog": [
{
"add": {
"timeSpent": "7m",
"started": "2019-07-05T11:05:00.000+0000"
}
}
]
},
"transition": {
"id": "31"
},
"fields": {
"project": {
"key": "JA"
},
"summary": "Project ",
"issuetype": {
"name": "Story",
"subtask": false
},
"customfield_10028": "JMU-24",
"priority": {
"name": "High"
},
"timetracking": {
"remainingEstimate": "5",
"originalEstimate": "10"
},
"duedate": "2011-04-11T00:00:00.000Z"
}
},
{
"update": {
"worklog": [
{
"add": {
"timeSpent": "7m",
"started": "2019-07-05T11:05:00.000+0000"
}
}
]
},
"transition": {
"id": "31"
},
"fields": {
"project": {
"key": "JA"
},
"summary": "Project ",
"issuetype": {
"name": "Story",
"subtask": false
},
"customfield_10028": "JMU-24",
"priority": {
"name": "High"
},
"timetracking": {
"remainingEstimate": "5",
"originalEstimate": "10"
},
"duedate": "2011-04-11T00:00:00.000Z"
}
}
]
}'

 

 

RESPONSE: 

MicrosoftTeams-image (4).png

 

So, the issues are being created, but the transition is not happening.

Pawan_Namagiri April 9, 2020

@Dario B 

I have the same query. Can you please help?

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 14, 2020

Hello @Arun Chittem  and @Pawan_Namagiri ,

I have created the below request to get this bug fixed:

Please vote for the above bug ticket and set yourself as a watcher so that you will be notified in case of any update/progress. The bug will be addressed according to the Atlassian Cloud bug fixing policy.

 

As a temporary workaround, you can transition the issues after they have been created, using the Transition issue (POST /rest/api/3/issue/{issueIdOrKey}/transitions) endpoint.

 

Cheers,
Dario

Like Christophe_Pot likes this
Christophe_Pot June 11, 2020

Added my vote to the issue !

Like Dario B likes this
Dev2 CID TDS November 25, 2020

@Dario B 

> As a temporary workaround, you can transition the issues after they have been created, using the Transition issue (POST /rest/api/3/issue/{issueIdOrKey}/transitions) endpoint.

Will this workaround apply when each issue have different transition id value?

Scenario:

1.  Bulk create issues using REST API. Each issue may have different transition id value.

0 votes
Nazar Vasylyshyn June 3, 2022

Hello! Is there any solution to handle bulk update issue transition? Or handle it while performing bulk create an issue on Jira? For me, it's strange why a company like Jira has so many gaps and can't create a normal REST API for us, developers, who try to implement features related to Jira. It's not the first time when I faced JIRA REST API troubles because some data that comes back from a response are limited or you can't perform some operation, or there is simply no endpoint for your functionality, although logically, it should be, such as bulk updating transitions for issues

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events