-
Bug
-
Resolution: Duplicate
-
Low (View bug fix roadmap)
-
None
-
6.4.14, 7.6.0
-
None
-
6.04
-
2
-
Severity 2 - Major
-
Summary
Jira default workflow generates corrupted descriptor for Software Project.
Environment
- JIRA Software 7.6.0-EAP01
- JIRA Agile 6.7.16
Steps to Reproduce
Expected Results
Transitions are correctly rendered.
Actual Results
Transitions get corrupted. However, no error or warning occur. This corruption also happens to copied workflow from the original generated one.
Notes
Descriptor is formatted by valid XML. However, it contains redundant line break in XML attributes like:
<arg name="class.name">com.atlassian.jira.workflow.function.event.FireIssueEventFunction </arg>
E.g. Here's a whole record: 1512632770_workflow.csv from
select * from jiraworkflows where workflowname id = 10200
It's still not sure which is the problem injecting line break itself or parser unavailability for a line break.
Workaround
For Jira administrator:
- If you need to edit the generated workflow, create your own workflow instead of editing or copying the generated workflow
For system administrator:
- Stop JIRA
- Make sure to backup data just in case
- Fix the descriptor
- For instance:
$ W_ID="10200" $ psql ... -d __DB_NAME__ -c "Copy (select descriptor from jiraworkflows where id = ${W_ID}) To STDOUT;" > descriptor_${W_ID}.xml # Edit the xml file (Remove '\n' and the redundant line breaks) $ psql ... -c "update jiraworkflows set descriptor = '$(cat descriptor_${W_ID}.xml)' where id = ${W_ID}" __DB_NAME__
- For instance:
- Start JIRA
- Verify the affected workflow is fixed (Discard the draft workflow if exists)
- duplicates
-
JSWSERVER-11547 JIRA Agile Simplified Workflow - Post Functions displayed incorrectly
-
- Closed
-
- is related to
-
JRASERVER-23071 Line breaks in workflow XML result in transition crashes
-
- Closed
-
I find 2 cases.
Simple case is when creating Kanban project.
And another one is converting any projects to Kanban project. In this case, Jira workflow engine simplifies its workflow and this simplification process inserts line break into XML attribution definition, then write JIRAWORKFLOWS table.
N.Chihara