diff --git a/app/models/ticket.rb b/app/models/ticket.rb index ecb724fa3..e8631a3ac 100644 --- a/app/models/ticket.rb +++ b/app/models/ticket.rb @@ -24,11 +24,26 @@ class Ticket < ApplicationModel include Ticket::Escalation include Ticket::Subject + include Ticket::Permission extend Ticket::Search - extend Ticket::Permission attr_accessor :callback_loop +=begin + +merge tickets + + ticket = Ticket.find(123) + result = ticket.merge_to( + :ticket_id => 123, + ) + +returns + + result = true|false + +=end + def agent_of_group Group.find( self.group_id ).users.where( :active => true ).joins(:roles).where( 'roles.name' => 'Agent', 'roles.active' => true ).uniq() end diff --git a/app/models/ticket/search.rb b/app/models/ticket/search.rb index 42437fc53..c51158d70 100644 --- a/app/models/ticket/search.rb +++ b/app/models/ticket/search.rb @@ -18,7 +18,7 @@ returns =end - def self.search (params) + def search (params) # get params query = params[:query]