Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-11547

JIRA Agile Simplified Workflow - Post Functions displayed incorrectly

      Summary

      With workflows created by jira agile the descriptions of the post functions are referencing the java objects instead of the descriptions, please see the attached screenshot.

      Environment

      • JIRA Software Scrum Default Workflow

      Steps to Reproduce

      1. Select Manage Boards
      2. Create Board
      3. Create a Scrumb board
      4. New project and a new board
      5. Fill in Board / Project name
      6. Select *Agile Simplified Workflow (reocmmended)
      7. Create Board
      8. Go to workflow for this newly created project
      9. Select a transition
      10. check the Post Functions

      Expected Results

      A description of the post functions.

      Actual Results

      The following will be processed after the transition occurs

      1. Type: class
        Class: com.atlassian.jira.workflow.function.issue.UpdateIssueFieldFunction
        Arguments:
        field.name = resolution
        field.value =
      2. Type: class
        Class: com.atlassian.jira.workflow.function.issue.UpdateIssueStatusFunction
      3. Add a comment to an issue if one is entered during a transition.
      4. Type: class
        Class: com.atlassian.jira.workflow.function.issue.GenerateChangeHistoryFunction
      5. Re-index an issue to keep indexes in sync with the database.
      6. Type: class
        Class: com.atlassian.jira.workflow.function.event.FireIssueEventFunction
        Arguments:
        eventTypeId = 13

      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" # Change this value as the affected workflow ID
          $ DB_NAME="__JIRA_DATABASE_NAME__"
          $ 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)

          Form Name

            [JSWSERVER-11547] JIRA Agile Simplified Workflow - Post Functions displayed incorrectly

            afb6234f8e80 Is the fix only visible in the newly created workflows, or is there some sort of conversion available for the old ones?

            Piotr Janik added a comment - afb6234f8e80 Is the fix only visible in the newly created workflows, or is there some sort of conversion available for the old ones?

            Noticed this in Jira 9 with workflows created by Jira 7.2 or lower

            Sebastian Mendel added a comment - Noticed this in Jira 9 with workflows created by Jira 7.2 or lower

            Never to late !

            Vincent Thoulé [Alkaes] added a comment - Never to late !

            At long last...  

            Derek Mart added a comment - At long last...  

            Chuck V added a comment -

            This is annoying, any ideas on root cause? Still finding corrupted workflows in 8.20.1 now.

            Chuck V added a comment - This is annoying, any ideas on root cause? Still finding corrupted workflows in 8.20.1 now.

            vthoule@pyxis-tech.com Chapeaux bas!

            Piotr Janik added a comment - vthoule@pyxis-tech.com Chapeaux bas!

            Oups ... I forgot that Attachment Permission was no more allowed.

            Sure that you will be able to find and see theses malformed Workflows !

            Vincent Thoulé [Alkaes] added a comment - Oups ... I forgot that Attachment Permission was no more allowed. Sure that you will be able to find and see theses malformed Workflows !

            Soon 7 years that this bug has been raised.

            What are you waiting for fixing such bug ?

            You have some difficulty to identify the root cause ?

            In your source files, I have no idea where you managed it ...

            But in the distributed files (here 8.17.0), you will find them in :

            • atlassian-jira-software-8.17.0\atlassian-jira\WEB-INF\application-installation\jira-software-application\jira-greenhopper-plugin-8.17.0.jar

            In this plugin ...

            • The XML Descriptor modules/project-templates.xml defined 4 project-blueprint modules :
              • basic-software-development-template
              • gh-sample-kanban-template
              • gh-kanban-template
              • gh-scrum-template
            • The Enum com.atlassian.greenhopper.service.workflow.SimplifiedWorkflowPresets defines 4 predefined Workflows :
              • SIMPLIFIED_WORKFLOW,
              • KANBAN_SIMPLIFIED_WORKFLOW,
              • KANBAN_SIMPLIFIED_SAMPLE_WORKFLOW,
              • BASIC_SOFTWARE_WORKFLOW

            When requesting a new project based on a model (example com.pyxis.greenhopper.jira:basic-software-development-template), the project will be created using by the PresetData built by the class com.atlassian.greenhopper.service.workflow.SimplifiedWorkflowServiceImpl for each known templates.

            These PresetData references 3 predefined Workflows :

            • \templates\greenhopper\jira\workflow\BasicSoftwareDevelopment.xml
            • \templates\greenhopper\jira\workflow\GreenHopperKanban.xml
            • \templates\greenhopper\jira\workflow\GreenHopperLite.xml

            HERE is the needed correction !! These 3 Workflows are not well-formed !!!

            The XML Indentation is strangely performed and some extra-characters are present.


            It has no effect for OSWorkflow Engine, in charge of interpreting th Workflow descriptor, but it is the root cause of this painful bug when editing the Workflow. A different XML Parser is perhaps used for this 2 distinct features.

            IN ALL CASE, YOU HAVE NOW THE FOCUS ON WHERE THE CORRECTION HAS TO BE DONE !!

            Note that in the same, it will correct also the Sample Projects created with com.atlassian.greenhopper.sampledata.SampleDataGeneratorImpl.

            Please correct it before its birthday !

            Vincent

            PS : Hopping that this comment will be read not only by Watcher Customers.

            Vincent Thoulé [Alkaes] added a comment - - edited Soon 7 years that this bug has been raised. What are you waiting for fixing such bug ? You have some difficulty to identify the root cause ? In your source files, I have no idea where you managed it ... But in the distributed files (here 8.17.0), you will find them in : atlassian-jira-software-8.17.0\atlassian-jira\WEB-INF\application-installation\jira-software-application\jira-greenhopper-plugin-8.17.0.jar In this plugin ... The XML Descriptor modules/project-templates.xml defined 4 project-blueprint modules : basic-software-development-template gh-sample-kanban-template gh-kanban-template gh-scrum-template The Enum com.atlassian.greenhopper.service.workflow.SimplifiedWorkflowPresets defines 4 predefined Workflows : SIMPLIFIED_WORKFLOW, KANBAN_SIMPLIFIED_WORKFLOW, KANBAN_SIMPLIFIED_SAMPLE_WORKFLOW, BASIC_SOFTWARE_WORKFLOW When requesting a new project based on a model (example com.pyxis.greenhopper.jira:basic-software-development-template ), the project will be created using by the PresetData built by the class com.atlassian.greenhopper.service.workflow.SimplifiedWorkflowServiceImpl for each known templates. These PresetData references 3 predefined Workflows : \templates\greenhopper\jira\workflow\BasicSoftwareDevelopment.xml \templates\greenhopper\jira\workflow\GreenHopperKanban.xml \templates\greenhopper\jira\workflow\GreenHopperLite.xml HERE is the needed correction !! These 3 Workflows are not well-formed !!! The XML Indentation is strangely performed and some extra-characters are present. It has no effect for OSWorkflow Engine , in charge of interpreting th Workflow descriptor, but it is the root cause of this painful bug  when editing the Workflow. A different XML Parser is perhaps used for this 2 distinct features. IN ALL CASE, YOU HAVE NOW THE FOCUS ON WHERE THE CORRECTION HAS TO BE DONE !! Note that in the same, it will correct also the Sample Projects created with com.atlassian.greenhopper.sampledata.SampleDataGeneratorImpl . Please correct it before its birthday ! Vincent PS : Hopping that this comment will be read not only by Watcher Customers.

            Piotr Janik added a comment - - edited

            3ac924f844ec: Thank you, but the first workaround has already been covered by Alexander Sowatsch, and the second one is only acceptable if you haven't added too much custom transitions that you'd need to recreate or attach temporarily to other statuses.

            Piotr Janik added a comment - - edited 3ac924f844ec : Thank you, but the first workaround has already been covered by Alexander Sowatsch , and the second one is only acceptable if you haven't added too much custom transitions that you'd need to recreate or attach temporarily to other statuses.

            You can also copy the workflow and remove the statuses and re-add them. Then replace the workflow back to attached workflow.

            Ahmed Arslan added a comment - You can also copy the workflow and remove the statuses and re-add them. Then replace the workflow back to attached workflow.

              afb6234f8e80 Mark Patterson (Inactive)
              ilabras Ibrahim (Inactive)
              Affected customers:
              132 This affects my team
              Watchers:
              125 Start watching this issue

                Created:
                Updated:
                Resolved: