Class: Tractive::Ticket

Inherits:
Object
  • Object
show all
Defined in:
lib/tractive/models/ticket.rb

Instance Method Summary collapse

Instance Method Details

#all_changesObject



37
38
39
40
41
# File 'lib/tractive/models/ticket.rb', line 37

def all_changes
  # combine the changes and attachment table results and sort them by date
  change_arr = changes + attachments
  change_arr.sort_by { |change| change[:time] }
end

#closed_commentsObject



43
44
45
# File 'lib/tractive/models/ticket.rb', line 43

def closed_comments
  changes_dataset.where(field: "status", newvalue: "closed")
end