Issues can be unassigned now
This commit is contained in:
parent
6abc649590
commit
88c625e3f7
8 changed files with 29 additions and 17 deletions
|
@ -11,7 +11,6 @@ class Issue < ActiveRecord::Base
|
|||
attr_accessor :author_id_of_changes
|
||||
|
||||
validates_presence_of :project_id
|
||||
validates_presence_of :assignee_id
|
||||
validates_presence_of :author_id
|
||||
|
||||
delegate :name,
|
||||
|
@ -22,6 +21,7 @@ class Issue < ActiveRecord::Base
|
|||
delegate :name,
|
||||
:email,
|
||||
:to => :assignee,
|
||||
:allow_nil => true,
|
||||
:prefix => true
|
||||
|
||||
validates :title,
|
||||
|
@ -56,6 +56,10 @@ class Issue < ActiveRecord::Base
|
|||
today? && created_at == updated_at
|
||||
end
|
||||
|
||||
def is_assigned?
|
||||
!!assignee_id
|
||||
end
|
||||
|
||||
def is_being_reassigned?
|
||||
assignee_id_changed?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue