summaryrefslogtreecommitdiff
path: root/app/models/issue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 3ed47ef1bea..844d418b1e0 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -27,7 +27,7 @@ class Issue < ActiveRecord::Base
validates :title,
:presence => true,
:length => { :within => 0..255 }
-
+
validates :description,
:length => { :within => 0..2000 }
@@ -55,6 +55,18 @@ class Issue < ActiveRecord::Base
def new?
today? && created_at == updated_at
end
+
+ def is_being_reassigned?
+ assignee_id_changed?
+ end
+
+ def is_being_closed?
+ closed_changed? && closed
+ end
+
+ def is_being_reopened?
+ closed_changed? && !closed
+ end
end
# == Schema Information
#