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

Workflow Integrity Check needs an additional check

    XMLWordPrintable

Details

    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      You need to account for the case where the jiraissue.issuestatus is null.

      We had quite a large number of these - and in all cases, the worflow status was ok - so it was just a matter of updating jiraissue with the value from OS_WFENTRY

      REPORT:

      SELECT     jiraissue.pkey, OS_WFENTRY.STATE, jiraissue.issuestatus
      FROM         jiraissue INNER JOIN
                            OS_WFENTRY ON jiraissue.WORKFLOW_ID = OS_WFENTRY.ID
      WHERE     (jiraissue.issuestatus IS NULL)
      ORDER BY jiraissue.pkey;
      

      FIX:

      update jiraissue
      set    issuestatus = ( select state 
                             from   os_wfentry
                             where  id = workflow_id )
      where  issuestatus is null;
      

      And pls make it efficient (no N+1 database calls...) - the other integrity checks are quite slow because of inefficient database access...

      Attachments

        Issue Links

          Activity

            People

              dylan@atlassian.com Dylan Etkin [Atlassian]
              3b1ae0ec93c9 Nick Minutello
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: