]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 762785: Attachments are attached to the wrong comment when created by email_in.pl
authorA. Shimono <shimono@bug-ja.org>
Wed, 20 Jun 2012 22:20:40 +0000 (00:20 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Wed, 20 Jun 2012 22:20:40 +0000 (00:20 +0200)
r/a=LpSolit

email_in.pl

index ed4cf9a045154f3edca79bf6893514cc74714e29..34e57c90ccf2b3e2cb018efce8eec9484e07ecaa 100755 (executable)
@@ -235,7 +235,8 @@ sub process_bug {
 
     my $added_comment;
     if (trim($fields{'comment'})) {
-        $added_comment = $bug->comments->[-1];
+        # The "old" bug object doesn't contain the comment we just added.
+        $added_comment = Bugzilla::Bug->check($bug_id)->comments->[-1];
     }
     return ($bug, $added_comment);
 }