Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,297,272
Community Members
 
Community Events
165
Community Groups

How to do a transition during bulk issue creation?

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 Apr 08, 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

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.

@Dario B 

I have the same query. Can you please help?

Dario B Atlassian Team Apr 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

Added my vote to the issue !

Like Dario B likes this

@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.

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
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,660 views 37 46
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you