I am using Bulk create workflows API from Jira Cloud to create a workflow using existing workflow statuses within the Jira Site.
If I am trying to create a workflow with new status which is not exists in Jira Site is getting succeeded. However if the workflow status is already present is always failing with below error
{ "errorMessages": [ "Status name \"Not Started\" must be unique." ], "errors": {} }
Here is the sample payload which I am using:
{ "scope": {
"type": "GLOBAL"
},
"statuses": [
{
"description": "",
"name": "Not Started",
"statusCategory": "TODO",
"statusReference": "9a734e9b-fcf8-4b23-8574-e35609d42fb3"
}
],
"workflows": [
{
"description": "Action Item Workflow that applies to all projects that are either test or come via intake as a Standard project",
"name": "Action Item Workflow",
"startPointLayout": {
"x": 784.0,
"y": 67.4
},
"statuses": [
{
"layout": {
"x": 736.2705078125,
"y": 149.29999877929689
},
"properties": {},
"statusReference": "9a734e9b-fcf8-4b23-8574-e35609d42fb3"
}
],
"transitions": [
{
"id": "1",
"type": "INITIAL",
"from": [],
"to": {
"statusReference": "9a734e9b-fcf8-4b23-8574-e35609d42fb3",
"port": 1
},
"name": "Create",
"description": "",
"actions": [],
"validators": [
{
"ruleKey": "system:check-permission-validator",
"parameters": {
"permissionKey": "CREATE_ISSUES"
},
"id": "c11b6b06-5cfd-4606-9596-cb64bd1d1c08"
}
],
"triggers": [],
"properties": {}
}
]
}
]
}