Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to delete status that has issues from a workflow

Yury Buzenets
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 3, 2022

We were using a script from this question to make a copy of a workflow scheme that is shared between several projects and assign it to a specific project, so that they have base workflows but can make changes to their workflows without affecting other projects. The script works as expected, new workflow scheme with copies of each workflow is created and assigned to the project

But then we ran into a weird issue when editing the workflows.

If the project had issues before we copied the workflow, we didn't create any new issues, and we edit the workflow from "Project settings" page (using a link like <BASE_URL>/plugins/servlet/project-config/<PROJECT_KEY>/workflow/edit/?name=<WORKFLOW_NAME>), then it's somehow possible to delete the statuses from that workflow even though there are issues in that status that are associated with this workflow.

If we create new issues and move them into the same statuses before editing the workflow, everything works as expected and we get "Failed to remove a status" message.

If we go into the Administration (secure/admin/workflows/ViewWorkflowSteps.jspa) to edit the workflow instead of using the Project Settings page, Delete button is inactive for statuses that have issues in this status associated with this workflow.

Maybe there are some missing steps that we need to do after associating the new scheme with the project to make sure that all issues are properly associated with their workflows? Re-indexing the project doesn't seem to do anything though

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 3, 2022

This is because the script does not go through the workflow migration process for existing projects. 

It's basically breaking things and you shouldn't be using it to change schemes (for any projects that have existing issues)

Yury Buzenets
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 3, 2022

Thanks, I think I understand the changes I need to make to trigger the workflow migration so that it works on projects with existing issues

Suggest an answer

Log in or Sign up to answer