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)

            [JRASERVER-66448] XML descriptor gets broken with Software Project

            Bugfix Automation Bot made changes -
            Minimum Version New: 6.04
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2848632 ] New: JAC Bug Workflow v3 [ 2930083 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Symptom Severity Original: Major [ 14431 ] New: Severity 2 - Major [ 15831 ]
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v7 - Restricted [ 2584822 ] New: JAC Bug Workflow v2 [ 2848632 ]
            Status Original: Closed [ 6 ] New: Resolved [ 5 ]
            Ignat (Inactive) made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 - Restricted [ 2488163 ] New: JIRA Bug Workflow w Kanban v7 - Restricted [ 2584822 ]
            K. Yamamoto made changes -
            Resolution New: Duplicate [ 3 ]
            Status Original: Open [ 1 ] New: Closed [ 6 ]
            K. Yamamoto made changes -
            Link New: This issue duplicates JSWSERVER-11547 [ JSWSERVER-11547 ]
            SET Analytics Bot made changes -
            Support reference count New: 2
            K. Yamamoto made changes -
            Description Original: h3. Summary

            Jira default workflow generates corrupted descriptor for Software Project.

            h3. Environment
             * JIRA Software 7.6.0-EAP01
             * JIRA Agile 6.7.16

            h3. Steps to Reproduce
             # Create a Software Project (Any of Scrum, Kanban, Basic)
             # Edit its workflow and select Post Functions
             !Screenshot 2017-12-07 18.10.18.png|thumbnail!

            h3. Expected Results

            Transitions are correctly rendered.
            h3. Actual Results

            Transitions get corrupted. However, no error or warning occur. This corruption also happens to copied workflow from the original generated one.
            h3. Notes

            Descriptor is formatted by valid XML. However, it contains redundant line break in XML attributes like:
            {code:none}
            <arg name="class.name">com.atlassian.jira.workflow.function.event.FireIssueEventFunction
                          </arg>
            {code}
            E.g. Here's a whole record: [^1512632770_workflow.csv] from
            {code:none}
            select * from jiraworkflows where workflowname id = 10200
            {code}
            It's still not sure which is the problem injecting line break itself or parser unavailability for a line break.
            h3. 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:
             # Make sure to [export backup|https://confluence.atlassian.com/adminjiraserver/backing-up-data-938847673.html] in case you lost the data
             # [Stop JIRA|https://confluence.atlassian.com/adminjiraserver/start-and-stop-jira-applications-938847802.html]
             # Fix the descriptor
             ** For instance:
            {code:none}
            $ 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__
            {code}
             # [Start JIRA|https://confluence.atlassian.com/adminjiraserver/start-and-stop-jira-applications-938847802.html]
             # Verify the affected workflow is fixed (Discard the draft workflow if exists)
            New: h3. Summary

            Jira default workflow generates corrupted descriptor for Software Project.

            h3. Environment
             * JIRA Software 7.6.0-EAP01
             * JIRA Agile 6.7.16

            h3. Steps to Reproduce
             # Create a Software Project (Any of Scrum, Kanban, Basic)
             # Edit its workflow and select Post Functions
             !Screenshot 2017-12-07 18.10.18.png|thumbnail!

            h3. Expected Results

            Transitions are correctly rendered.
            h3. Actual Results

            Transitions get corrupted. However, no error or warning occur. This corruption also happens to copied workflow from the original generated one.
            h3. Notes

            Descriptor is formatted by valid XML. However, it contains redundant line break in XML attributes like:
            {code:none}
            <arg name="class.name">com.atlassian.jira.workflow.function.event.FireIssueEventFunction
                          </arg>
            {code}
            E.g. Here's a whole record: [^1512632770_workflow.csv] from
            {code:none}
            select * from jiraworkflows where workflowname id = 10200
            {code}
            It's still not sure which is the problem injecting line break itself or parser unavailability for a line break.
            h3. 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|https://confluence.atlassian.com/adminjiraserver/start-and-stop-jira-applications-938847802.html]
             # Make sure to [backup data|https://confluence.atlassian.com/adminjiraserver/backing-up-data-938847673.html] just in case
             # Fix the descriptor
             ** For instance:
            {code:none}
            $ 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__
            {code}
             # [Start JIRA|https://confluence.atlassian.com/adminjiraserver/start-and-stop-jira-applications-938847802.html]
             # Verify the affected workflow is fixed (Discard the draft workflow if exists)
            K. Yamamoto made changes -
            Description Original: h3. Summary

            Jira default workflow generates invalid descriptor for Software Project
            h3. Environment
             * JIRA Software 7.6.0-EAP01
             * JIRA Agile 6.7.16

            h3. Steps to Reproduce
             # Create a Software Project (Any of Scrum, Kanban, Basic)
             # Edit its workflow and select Post Functions
             !Screenshot 2017-12-07 18.10.18.png|thumbnail!

            h3. Expected Results

            Transitions are correctly rendered.
            h3. Actual Results

            Transitions get corrupted. However, no error or warning occur. This corruption also happens to copied workflow from the original generated one.
            h3. Notes

            Descriptor contains redundant line break in XML attributes like:
            {code:none}
            <arg name="class.name">com.atlassian.jira.workflow.function.event.FireIssueEventFunction
                          </arg>
            {code}
            E.g. Here's a whole record: [^1512632770_workflow.csv] from
            {code:none}
            select * from jiraworkflows where workflowname id = 10200
            {code}
            It's still not sure which is the problem injecting line break itself or parser unavailability for a line break.
            h3. 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:
             # Make sure to [export backup|https://confluence.atlassian.com/adminjiraserver/backing-up-data-938847673.html] in case you lost the data
             # [Stop JIRA|https://confluence.atlassian.com/adminjiraserver/start-and-stop-jira-applications-938847802.html]
             # Fix the descriptor
             ** For instance:
            {code:none}
            $ 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__
            {code}
             # [Start JIRA|https://confluence.atlassian.com/adminjiraserver/start-and-stop-jira-applications-938847802.html]
             # Verify the affected workflow is fixed (Discard the draft workflow if exists)
            New: h3. Summary

            Jira default workflow generates corrupted descriptor for Software Project.

            h3. Environment
             * JIRA Software 7.6.0-EAP01
             * JIRA Agile 6.7.16

            h3. Steps to Reproduce
             # Create a Software Project (Any of Scrum, Kanban, Basic)
             # Edit its workflow and select Post Functions
             !Screenshot 2017-12-07 18.10.18.png|thumbnail!

            h3. Expected Results

            Transitions are correctly rendered.
            h3. Actual Results

            Transitions get corrupted. However, no error or warning occur. This corruption also happens to copied workflow from the original generated one.
            h3. Notes

            Descriptor is formatted by valid XML. However, it contains redundant line break in XML attributes like:
            {code:none}
            <arg name="class.name">com.atlassian.jira.workflow.function.event.FireIssueEventFunction
                          </arg>
            {code}
            E.g. Here's a whole record: [^1512632770_workflow.csv] from
            {code:none}
            select * from jiraworkflows where workflowname id = 10200
            {code}
            It's still not sure which is the problem injecting line break itself or parser unavailability for a line break.
            h3. 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:
             # Make sure to [export backup|https://confluence.atlassian.com/adminjiraserver/backing-up-data-938847673.html] in case you lost the data
             # [Stop JIRA|https://confluence.atlassian.com/adminjiraserver/start-and-stop-jira-applications-938847802.html]
             # Fix the descriptor
             ** For instance:
            {code:none}
            $ 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__
            {code}
             # [Start JIRA|https://confluence.atlassian.com/adminjiraserver/start-and-stop-jira-applications-938847802.html]
             # Verify the affected workflow is fixed (Discard the draft workflow if exists)

              Unassigned Unassigned
              kyamamoto@atlassian.com K. Yamamoto
              Affected customers:
              2 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: