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

Attachment lost with parallel bulk moves

    XMLWordPrintable

Details

    Description

      Steps to reproduce the problem:

      1. Create an issue in Project A and add an attachment
      2. Bulk Move that issue to Project B, but wait before confirming the Bulk Move.
      3. In a second browser, log in with the same user, Bulk Move the same issue to Project B, and confirm the operation. You can see that the issue is moved, it got assigned a new issue id in the new project, and the attachment is moved to the correct path.
      4. Confirm the bulk move in the first browser. You get an error saying
        Error
        The issue you are trying to view does not exist.

        . The logs will report

        Bulk edit bean unexpectedly null. Perhaps session was lost (e.g. when URL used is different to base URL in General Configuration)?
      5. The second bulk move partially succeeds. A new issue id is given in the new project, and the change history is reflected accordingly. However, the file attachment is lost.

      It is likely that this situation would be reproducible by clicking the back button on the browser while bulk moving, if there were many issues on the bulk move.

      The first bulk move operation did move the attachment from the old project to the new one. The second bulk move still tries to move the attachment from the old location, and fails.

      At the very least, the BulkMoveOperation.moveAttachments function should check whether the renameTo function succeeds or fails, and log an error message if failure. Ideally, this situation would be prevented all together, and either the move of that issue would fail, or the attachment would be moved successfully.

      Attachments

        Issue Links

          Activity

            People

              mlassau Mark Lassau (Inactive)
              dalonso Diego Alonso [Atlassian]
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h