]> 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:17:33 +0000 (00:17 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Wed, 20 Jun 2012 22:17:33 +0000 (00:17 +0200)
r/a=LpSolit

email_in.pl

index 3b684b0fcc3db03975a511f9897974a4f4b66e7e..53b5ac2a888cda3777039475071a3b228cd9c4fd 100755 (executable)
@@ -233,7 +233,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);
 }