Follow up: Implemented Ticket.process_pending. Fixed UnitTests for setting up new system.
This commit is contained in:
parent
bf86afb056
commit
6511a70ff8
2 changed files with 9 additions and 6 deletions
|
@ -7,11 +7,14 @@ class ProcessPendingTickets < ActiveRecord::Migration
|
|||
pending_close_state = Ticket::State.find_by(
|
||||
name: 'pending close',
|
||||
)
|
||||
|
||||
if pending_close_state
|
||||
closed_state = Ticket::State.find_by(
|
||||
name: 'closed',
|
||||
)
|
||||
pending_close_state.next_state_id = closed_state.id
|
||||
pending_close_state.save!
|
||||
end
|
||||
|
||||
# add Ticket.process_pending
|
||||
Scheduler.create_or_update(
|
||||
|
|
|
@ -1366,7 +1366,7 @@ Ticket::State.create_if_not_exists( id: 3, name: 'pending reminder', state_type_
|
|||
Ticket::State.create_if_not_exists( id: 4, name: 'closed', state_type_id: Ticket::StateType.where(name: 'closed').first.id )
|
||||
Ticket::State.create_if_not_exists( id: 5, name: 'merged', state_type_id: Ticket::StateType.where(name: 'merged').first.id )
|
||||
Ticket::State.create_if_not_exists( id: 6, name: 'removed', state_type_id: Ticket::StateType.where(name: 'removed').first.id, active: false )
|
||||
Ticket::State.create_if_not_exists( id: 7, name: 'pending close', state_type_id: Ticket::StateType.where(name: 'pending action').first.id, next_state_id: 5 )
|
||||
Ticket::State.create_if_not_exists( id: 7, name: 'pending close', state_type_id: Ticket::StateType.where(name: 'pending action').first.id, next_state_id: 4 )
|
||||
|
||||
Ticket::Priority.create_if_not_exists( id: 1, name: '1 low' )
|
||||
Ticket::Priority.create_if_not_exists( id: 2, name: '2 normal' )
|
||||
|
|
Loading…
Reference in a new issue