I'm trying to create an issue with Done status (please don't ask me why - this will be some kind of confirmation of other actions) using REST API. Is it possible to set the status at the creation step? I know I can first create an issue and then moved it by `transition` but this is not quite efficient quick solution.
According to the docs I was trying something like this:
curl --request POST \
--url 'https://<company_name>.atlassian.net/rest/api/3/issue' \
--user '<username:token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"fields": {
"summary": "Remote with done status",
"issuetype": {
"id": "12113"
},
"project": {
"key": "TEST"
},
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "Basic auth",
"type": "text"
}
]
}
]
},
"transition": {
"id": "761"
}
}
}'
But I'm getting an error:
errorMessages":[],"errors":{"transition":"Field 'transition' cannot be set. It is not on the appropriate screen, or unknown.
Hi Maciej,
You won't be able to create it with the Done status. Jira always creates the issue with the first status associated in the workflow.
To work around your issue, you'll need to create the issue, then send subsequent POSTs to transition the issue to Done.
The other alternative I've seen is to create a new issue type for the project, have a new workflow with only one status "Done", and then create this new issue type. Caveats here are reporting and dashboards will need to be updated. Please also don't forget to set a resolution!
As JimmyVan said, subsequent posts is the option to go.
Another alternative: You can try adding a Post Function on Create transition; Fast Track Transition from script runner and trigger the transition to Done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
is this still the case? It must be one of the most requested features to be able to create a ticket with a certain status and not the first one that there is
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.