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

Completing a review may give a "Could not execute JDBC batch update" error when the reviewer has deleted a comment someone else has replied to

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 4.1.0
    • 2.7.11, 3.5.3, 3.6.2, 3.10.3
    • None

      Reviewer A comments, Reviewer B replies, B deletes comment, A deletes comment, A completes review — they see an error and cannot complete.
      or
      Reviewer A comments, Reviewer B replies with a draft comment, A deletes comment, A completes review — they see an error and cannot complete.

      This can also happen when there is a draft review with a reply. I'm not sure how the UI allows that situation to occur, but a customer has seen it.

      Update on 15/Jan/15:

      • The error doesn't happen for comments on file that were deleted, but for General Comments only.
      • With this error the reviewer is unable to complete the review, unless the workaround is applied.
      • Other user (e.g. review's author) is still able to close the review (but not to complete it, as completing a review is an option only for reviewers).

      Workaround

      • Database - Modifying data

        Always back up your database before performing any modification to the database. If possible, try your modifications on a test server.

      • Update the deleted comments directly in the database, so they will be back to the review.
      • Stop Crucible before applying any changes to the database, and make sure that you have a database backup.
      • Use the following SQL command to retrieve the comments affected by this problem:
        select * from cru_comment c
        where cru_deleted = true and exists(
          select * from cru_comment b where c.cru_comment_id = b.cru_reply_to_comment_id)
        
      • Update the comments by "restoring them" (setting the deleted flag to false):
        update cru_comment set cru_deleted = false 
          where cru_comment_id in (<cru_comment_ids>); 
        

        Where <cru_comment_ids> is the list of the ids returned by the first SQL command.

              kcichocki K (Inactive)
              tom@atlassian.com Tom Davies
              Votes:
              8 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: