diff options
author | Go MAEDA <maeda@farend.jp> | 2020-01-21 04:10:11 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-01-21 04:10:11 +0000 |
commit | d438c89b1a986176bf9fa6e5bb4dab6a1f4ee8e1 (patch) | |
tree | 0bd690b42a0d7722b99e5fdfa61d06aad1731502 /app | |
parent | 006b686499a469fcafbf34bd910332f246c75b48 (diff) | |
download | redmine-d438c89b1a986176bf9fa6e5bb4dab6a1f4ee8e1.tar.gz redmine-d438c89b1a986176bf9fa6e5bb4dab6a1f4ee8e1.zip |
Add IssuePriority#high? and #low? helpers (#32628).
Patch by Jan Schulz-Hofen.
git-svn-id: http://svn.redmine.org/redmine/trunk@19448 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue_priority.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/issue_priority.rb b/app/models/issue_priority.rb index 8326b8ffa..aa4c5265d 100644 --- a/app/models/issue_priority.rb +++ b/app/models/issue_priority.rb @@ -54,6 +54,14 @@ class IssuePriority < Enumeration end end + def high? + position > self.class.default_or_middle.position + end + + def low? + position < self.class.default_or_middle.position + end + # Updates position_name for active priorities # Called from migration 20121026003537_populate_enumerations_position_name def self.compute_position_names |