Add method for an issue to know whether it is being closed
Update IssueObserver to create a Note on the issue its being closed.
This commit is contained in:
parent
02924de3e1
commit
356430c3c0
4 changed files with 56 additions and 10 deletions
|
@ -64,6 +64,10 @@ class Issue < ActiveRecord::Base
|
|||
def is_being_reassigned?
|
||||
assignee_id_changed?
|
||||
end
|
||||
|
||||
def is_being_closed?
|
||||
closed_changed? && closed
|
||||
end
|
||||
end
|
||||
# == Schema Information
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue