-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 8.12.2, 8.13.3
-
Component/s: Administration - Workflows
-
None
-
8.12
-
1
-
Severity 2 - Major
Issue Summary
Importing a workflow using XML allows duplicate statuses with the same IDs and if both statuses have the same ID then the old one overwrites the newly created status name
Steps to Reproduce
- extract the existing issue IDs by running the below command:
select * from issuestatus;
- Export a workflow to XML and use any of the above-returned status IDs with different statuses in Jira the XML.
<arg name="class.name">com.atlassian.jira.workflow.function.issue.UpdateIssueStatusFunction</arg> </function> <function type="class"> <arg name="class.name">com.atlassian.jira.workflow.function.misc.CreateCommentFunction</arg> </function> <function type="class"> <arg name="class.name">com.atlassian.jira.workflow.function.issue.GenerateChangeHistoryFunction</arg> </function> <function type="class"> <arg name="class.name">com.atlassian.jira.workflow.function.issue.IssueReindexFunction</arg> </function> <function type="class"> <arg name="eventTypeId">13</arg> <arg name="class.name">com.atlassian.jira.workflow.function.event.FireIssueEventFunction</arg> </function> </post-functions> </unconditional-result> </results> </action> </actions> </step>
We have changed the issue status ID to 10102 that is already existing in our local instance.
<step id="49" name="Pending on customer's side"> <meta name="jira.status.id">10102</meta> <actions>
- Import the workflow by copying and pasting over the content of the XML
- imported the workflow using the modified XML file and we observed that the status name is being overwritten in the Diagram mode however the text displayed newly imported workflow status name
Expected Results
Jira throws a warning saying there's an existing status with the same ID and a different name
Actual Results
Jira imports the workflow without any warnings but displays the newly created status in text mode, the old status name in diagram mode, or vice-versa
Workaround
This is more seems to be related to the suggestion ticket :JRASERVER-43561-Validate workflow integrity before allowing addition to workflow scheme so the workaround provided might help