[rt-devel] API call to get "Created" value of history replies of all tickets
Alex Vandiver
alex at chmrr.net
Tue Jul 26 02:45:25 EDT 2016
On Mon, 25 Jul 2016 16:51:17 +0100
Andrii Iudin <andrii at ebi.ac.uk> wrote:
> However, since this has to be done for all the depositions' unresolved
> tickets, the loading of the page with the deposition list can take a
> long time (each API call is about 200 ms or more). Please could you tell
> if there is a query available to get the history for all the tickets in
> the queue in one go? We can then parse the result to obtain the
> necessary last reply times. Or is there a better way available to see
> the time of the last reply to the ticket, the email and whether it is a
> comment or not?
The time of last reply to the requestor is stored in the "Told"
field. If you need more than that, you'll need to denormalize the
information by putting it into custom fields (updated via scrips), which
you can then query all at once using the /REST/1.0/search/ticket
endpoint and setting your "fields" to contain those CFs.
Alternately, you could write your own endpoint entirely. That may also
still require denormalizing the data, as walking the transaction
history is unlikely to be performant, no matter how you slice it.
- Alex
More information about the rt-devel
mailing list