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:
{
I found some of your replies around Workflow Jira cloud APIs but none of the providing solution for above issue. Can you please check above issue and assist us in resolving the issue if you have suggestions or steps.
Here is the API reference which we are following.
If this is not the correct API to create a workflows using existing statuses, let me know the valid api reference.
Thanks
Hey @Vinod K Gandham,
I don't check into community that often. Sorry.
The issue is with the statuses in your payload. When no id is supplied we assume you are trying to making a new status with that name. So we are blocking the update because we don't allow you to create a new status with an existing name in the scope of the operation here.
"statuses": [
{
"description": "",
"name": "Not Started",
"statusCategory": "TODO",
"statusReference": "9a734e9b-fcf8-4b23-8574-e35609d42fb3",
"id": "<ID>"
}
],
For a bit of context around why,
The workflow update/create API is declarative, it will create and update the statuses that are related to the workflow in these updates. Because we don't allocate know what status-id will be generated by the system for new statuses we went with using a reference to connect the 'statuses' to the 'workflows' in the payload.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.