Fix loading of legacy comments from older Bugzillas
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Oct 2014 16:01:35 +0000 (16:01 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Oct 2014 16:01:35 +0000 (16:01 +0000)
* code-review.js:
(fetchHistory): We must support both the old-style and new-style
formats for attachment comments since the old-style format is
quoted and stored as text in the database forever.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174783 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/bugs.webkit.org/code-review.js

index f10158c..d93ee6e 100644 (file)
@@ -559,8 +559,13 @@ var CODE_REVIEW_UNITTEST;
           var text = $(this).find('.bz_comment_text').text();
 
           var comment_marker = 'Comment on attachment ' + attachment_id + ' .details.';
-          if (text.match(comment_marker))
+          if (text.match(comment_marker)) {
             $.merge(comments, scanForComments(author, text));
+          } else {
+              comment_marker = '(From update of attachment ' + attachment_id + ' .details.)';
+              if (text.match(comment_marker))
+                $.merge(comments, scanForComments(author, text));
+          }
 
           var style_queue_comment_marker = 'Attachment ' + attachment_id + ' .details. did not pass style-queue.'
           if (text.match(style_queue_comment_marker))