From 78153cacdf3de97bc58bdc7fb57010a2d9874f34 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 12 Apr 2015 09:16:54 +0000 Subject: Keywords in commit messages: journal entries are created even if nothing was changed (#19538). git-svn-id: http://svn.redmine.org/redmine/trunk@14164 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/changeset.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/models/changeset.rb') diff --git a/app/models/changeset.rb b/app/models/changeset.rb index 499191070..13213f3ab 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -242,8 +242,11 @@ class Changeset < ActiveRecord::Base end Redmine::Hook.call_hook(:model_changeset_scan_commit_for_issue_ids_pre_issue_update, { :changeset => self, :issue => issue, :action => action }) - unless issue.save - logger.warn("Issue ##{issue.id} could not be saved by changeset #{id}: #{issue.errors.full_messages}") if logger + + if issue.changes.any? + unless issue.save + logger.warn("Issue ##{issue.id} could not be saved by changeset #{id}: #{issue.errors.full_messages}") if logger + end end issue end -- cgit v1.2.3