diff options
author | Go MAEDA <maeda@farend.jp> | 2020-02-11 13:33:22 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-02-11 13:33:22 +0000 |
commit | 777704249f047ec3bc3751926a66dcb79bfb89a7 (patch) | |
tree | bdf765db0405a313f33a84e41479f6d8b0c2e254 /app/models/project.rb | |
parent | 39c979b3419c02967b6f68f9d99198fb64d9e30e (diff) | |
download | redmine-777704249f047ec3bc3751926a66dcb79bfb89a7.tar.gz redmine-777704249f047ec3bc3751926a66dcb79bfb89a7.zip |
Fix logging time via a commit message for project specific activities (#29838).
Patch by Jens Krämer.
git-svn-id: http://svn.redmine.org/redmine/trunk@19512 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index baeeb8e3e..3fe1604c5 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -295,6 +295,15 @@ class Project < ActiveRecord::Base end end + # returns the time log activity to be used when logging time via a changeset + def commit_logtime_activity + activity_id = Setting.commit_logtime_activity_id.to_i + if activity_id > 0 + activities + .find_by('id = ? OR parent_id = ?', activity_id, activity_id) + end + end + # Returns a :conditions SQL string that can be used to find the issues associated with this project. # # Examples: |