[rt-users] Monthly reports with REST (timeout)

Ruslan Zakirov ruslan.zakirov at gmail.com
Wed Dec 12 06:39:51 EST 2012

How many tickets are in the set? Your options are to use API instead of
rest or implement count command in rt cli and rt server side.

Ruslan from phone.
31.10.2012 15:26 пользователь "Ignacio Vazquez" <ivazquez at desdelaconsola.es>

> Hi all,
> I've been generating monthly reports with a crontab script that
> includes a line like this:
> /opt/rt3/bin/rt list "created >= '2012-04-01' AND status != 'rejected'
> AND Queue = 'whatever' AND (owner = 'user1' OR owner = 'user2')" |
> grep -v "No matching results." | wc -l
> As you can see, I'm only interested in the total number of tickets.
> I've find out that with a large number of possible results, I get a
> timeout so 0 tickets are returned.
> However, using the web search, because of the paginated displays, the
> search is much faster and also the web shows how many items are in the
> whole list with a line "Found: xxx tickets".
> My intention is still using an automated way to obtain the numbers.
> I've been reading the REST documentation and there is no way to query
> only for totals.
> Any ideas?
> Ignacio.
> --------
> We're hiring! http://bestpractical.com/jobs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20121212/ad586370/attachment.htm>

More information about the rt-users mailing list