1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

Make sure that the journal is not created if issue is saved.

git-svn-id: http://svn.redmine.org/redmine/trunk@16599 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2017-06-03 08:10:20 +00:00
parent 58dc4455cb
commit 1870a2e4fb
2 changed files with 7 additions and 0 deletions

View File

@ -247,6 +247,8 @@ class Changeset < ActiveRecord::Base
unless issue.save
logger.warn("Issue ##{issue.id} could not be saved by changeset #{id}: #{issue.errors.full_messages}") if logger
end
else
issue.clear_journal
end
issue
end

View File

@ -813,6 +813,11 @@ class Issue < ActiveRecord::Base
@current_journal
end
# Clears the current journal
def clear_journal
@current_journal = nil
end
# Returns the names of attributes that are journalized when updating the issue
def journalized_attribute_names
names = Issue.column_names - %w(id root_id lft rgt lock_version created_on updated_on closed_on)