Also set close time on ticket creation with close state.
This commit is contained in:
parent
2c505a5601
commit
ec8f36238c
1 changed files with 29 additions and 20 deletions
|
@ -1,7 +1,16 @@
|
|||
class Observer::Ticket::CloseTime < ActiveRecord::Observer
|
||||
observe 'ticket'
|
||||
|
||||
def after_create(record)
|
||||
_check(record)
|
||||
end
|
||||
|
||||
def after_update(record)
|
||||
_check(record)
|
||||
end
|
||||
|
||||
private
|
||||
def _check(record)
|
||||
# puts 'check close time'
|
||||
|
||||
# return if we run import mode
|
||||
|
|
Loading…
Reference in a new issue