From 68ca0636c4eeea2261b2e468c1461cf118693203 Mon Sep 17 00:00:00 2001 From: Tim Felgentreff Date: Tue, 14 Sep 2010 16:59:10 +0200 Subject: [PATCH] init journal will return the last_journal, not the new one, now --- app/models/changeset.rb | 2 +- app/models/mail_handler.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/changeset.rb b/app/models/changeset.rb index e3bd626c..94542b8f 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -110,7 +110,7 @@ class Changeset < ActiveRecord::Base if self.scmid && (! (csettext =~ /^r[0-9]+$/)) csettext = "commit:\"#{self.scmid}\"" end - journal = issue.init_journal(user || User.anonymous, ll(Setting.default_language, :text_status_changed_by_changeset, csettext)) + issue.init_journal(user || User.anonymous, ll(Setting.default_language, :text_status_changed_by_changeset, csettext)) issue.status = fix_status unless Setting.commit_fix_done_ratio.blank? issue.done_ratio = Setting.commit_fix_done_ratio.to_i diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index c620c9dc..6feb4e0f 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -179,7 +179,7 @@ class MailHandler < ActionMailer::Base end # add the note - journal = issue.init_journal(user, cleaned_up_text_body) + issue.init_journal(user, cleaned_up_text_body) add_attachments(issue) # check workflow if status && issue.new_statuses_allowed_to(user).include?(status) @@ -191,7 +191,7 @@ class MailHandler < ActionMailer::Base issue.save! logger.info "MailHandler: issue ##{issue.id} updated by #{user}" if logger && logger.info - journal + issue.last_journal end # Reply will be added to the issue