Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-3710

Upgrade from 1.6 to 2.3 results in Patch content losing diffs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • High
    • 3.9.0
    • 2.3.3
    • Server administration
    • None

    Description

      After upgrading from 1.6.6 to 2.3.3 I've noticed that any Crucible reviews that have Patch files associated to them will lose their diff content. Steps to reproduce:

      1. Create a new Review in 1.6.6 and attach a Patch file to the review.
      2. Perform an upgrade from 1.6.6 to 2.3.3.
      3. Start the new version of Crucible and view the review created in step one.
      4. Click on one of the files to view the diff and Crucible will return "No Change".

      The issue is that after the upgrade, some of the paths in the cru_stored_path get newlines appended to them which cause Crucible to silently fail to load the diff. For example:

       cru_path_id |                  cru_path
      ----------------------------------------------+-------------+--------------------------------------------
                 1 | /test/file1
      |
                 2 | /test/file2
      |     
                 3 | /test/file3
      |
                 4 | /test/file4
      |          
      

      In testing it appears that removing the newline at the end of cru_path will solve the problem. A restart of Crucible is required, after running the following SQL statement:

      UPDATE cru_stored_path SET cru_path = replace(cru_path, '\n', '');

      This is a pretty nasty upgrade bug that we should try to address in future versions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dhansen@atlassian.com Dylan Hansen [Atlassian]
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: