mirror of
https://github.com/meineerde/redmine.git
synced 2025-10-17 17:01:01 +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:
parent
58dc4455cb
commit
1870a2e4fb
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user