Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Status log (ticket_log_change) and status names


I'm making a short version of the log so that user can see who and when a status changed for a request but I'm not able to pull the name from ticket_status, should I make an additional SearchEngine for this?


Integer s_ticketId = 6995;

  SearchEngine se;
// se.addField("ticket_log_change.(ticket_status->id).name"); //Test
se.addCriteria("ticket_log_change.log_change", "OperatorEquals", "35"); // 35 = change status
se.addCriteria("ticket_log_change.ticket_id", "OperatorEquals", s_ticketId.toString());
se.addOrder("ticket_log_change.action_id.log_when", true);
print("From status: " + se.getField("ticket_log_change.from_value") + " To Status: " + se.getField("ticket_log_change.to_value") + "\n");

Made a test above but it won't work.


RE: Status log (ticket_log_change) and status names


There exists a shorter version of Log, accessible with URL: ticket.fcgi?_sf=0&action=listTicketLog&ticketId=<ticketId>, have you seen if this can solve your issue?

If not it is not possible to do any join from ticket_log_change against ticket_status table, and you would need to perhaps load Map with values from ticket_status table once in your screen, and simply perform lookup.

Von: Michel Krohn-Dale 16. Mrz 2020