init journal will return the last_journal, not the new one, now

This commit is contained in:
Tim Felgentreff 2010-09-14 16:59:10 +02:00
parent 0b852af604
commit 68ca0636c4
2 changed files with 3 additions and 3 deletions

View File

@ -110,7 +110,7 @@ class Changeset < ActiveRecord::Base
if self.scmid && (! (csettext =~ /^r[0-9]+$/)) if self.scmid && (! (csettext =~ /^r[0-9]+$/))
csettext = "commit:\"#{self.scmid}\"" csettext = "commit:\"#{self.scmid}\""
end 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 issue.status = fix_status
unless Setting.commit_fix_done_ratio.blank? unless Setting.commit_fix_done_ratio.blank?
issue.done_ratio = Setting.commit_fix_done_ratio.to_i issue.done_ratio = Setting.commit_fix_done_ratio.to_i

View File

@ -179,7 +179,7 @@ class MailHandler < ActionMailer::Base
end end
# add the note # add the note
journal = issue.init_journal(user, cleaned_up_text_body) issue.init_journal(user, cleaned_up_text_body)
add_attachments(issue) add_attachments(issue)
# check workflow # check workflow
if status && issue.new_statuses_allowed_to(user).include?(status) if status && issue.new_statuses_allowed_to(user).include?(status)
@ -191,7 +191,7 @@ class MailHandler < ActionMailer::Base
issue.save! issue.save!
logger.info "MailHandler: issue ##{issue.id} updated by #{user}" if logger && logger.info logger.info "MailHandler: issue ##{issue.id} updated by #{user}" if logger && logger.info
journal issue.last_journal
end end
# Reply will be added to the issue # Reply will be added to the issue