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

Version migration on startup dies when encountering invalid start date

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 6.5.0
    • 6.3.13.0
    • None

    Description

      Symptom

      The following error will appear on the browser upon opening Agile boards.

      Exception: 'moment' is undefined
      

      or

      Exception: Unable to get property 'init' of undefined or null reference
      

      Cause

      Agile performs a migration of version data on startup. If the data is invalid, e.g. the start date is later than the release date, the migration will fail and other essential startup tasks will be skipped - e.g. loading dynamic modules. This causes Agile to be unusable.

      Workaround

      Editing the data in the database can workaround this problem. Either that or disabling the sprint marker migration in GHS-9991.

      To fix the data causing the version migration to fail:

      1. Identify problematic records with the below SQL:
        select * from projectversion where startdate > releasedate or (startdate is null and releasedate is not null);
        
      2. This should return something like the below - keep track of the below id numbers as we'll need to change them:
          id   | project |    vname         |           description                       | sequence | released | archived | url |       startdate        |      releasedate
        -------+---------+------------------+---------------------------------------------+----------+----------+----------+-----+------------------------+------------------------
         19900 |   10404 | Avengers Release | Covers Captain Planet to Avengers Interface |        3 |          |          |     | 2014-03-31 00:00:00+08 | 2013-12-20 01:00:00+08
         20297 |   10395 | Sprint 35        | 3.0.0                                       |       37 | TRUE     |          |     |                        | 2014-01-12 01:00:00+08
        
      3. If values are present in the results, stop JIRA and backup the database.
      4. Update the problematic records so that the startdate is before releasedate or the startdate is no longer null. We can do this by editing the values, for example this will fix the problem in this particular example:
        update projectversion set startdate = '2013-12-20 00:00:00+08' where id = 19900;
        update projectversion set startdate = '2014-01-12 00:00:00+08' where id = 20297;
        
      5. Restart JIRA and wait for the version migration to complete, then verify the boards are working.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dtang David Tang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: