summaryrefslogtreecommitdiffstats
path: root/app/models/journal.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-20 10:42:16 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-20 10:42:16 +0000
commit1b002983c31f0936b38d56d2f3d8731f724fc5ef (patch)
treed6a278d4e173b28f658aa3ca636283d353a963ae /app/models/journal.rb
parent1535ac122053a428ca29f8887cb10994e467f1ab (diff)
downloadredmine-1b002983c31f0936b38d56d2f3d8731f724fc5ef.tar.gz
redmine-1b002983c31f0936b38d56d2f3d8731f724fc5ef.zip
Display the issue status in the email subject only if the status was actually changed.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1079 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/journal.rb')
-rw-r--r--app/models/journal.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/journal.rb b/app/models/journal.rb
index 64483d21d..d02067a9d 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -44,4 +44,9 @@ class Journal < ActiveRecord::Base
c = details.detect {|detail| detail.prop_key == 'status_id'}
(c && c.value) ? IssueStatus.find_by_id(c.value.to_i) : nil
end
+
+ def new_value_for(prop)
+ c = details.detect {|detail| detail.prop_key == prop}
+ c ? c.value : nil
+ end
end