Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-66448

XML descriptor gets broken with Software Project

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Low
    • None
    • 6.4.14, 7.6.0
    • None

    Description

      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

      1. Create a Software Project (Any of Scrum, Kanban, Basic)
      2. Edit its workflow and select Post Functions

      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:

      1. Stop JIRA
      2. Make sure to backup data just in case
      3. 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__
          
      4. Start JIRA
      5. Verify the affected workflow is fixed (Discard the draft workflow if exists)

      Attachments

        1. 1512632770_workflow.csv
          9 kB
          K. Yamamoto
        2. Screenshot 2017-12-07 18.10.18.png
          627 kB
          K. Yamamoto

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kyamamoto@atlassian.com K. Yamamoto
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: