Fixed caching key and inquiry of dynamic field value in HistoryTicketGet function (TE) and added a new parameter to disable default sorting of statistics.