Getting the number of search results

From: Jesse Vincent jesse@bestpractical.com
Date: Wed, 12 Sep 2001 16:36:35 -0400

You probably want to add a <% $session{‘tickets’}->Count %> results
found
line to Search/Listing.html

We are using RT for our abuse tickets. Is there an easy way to put
the
total number of tickets found when doing a content search? We like
to
know how many complaints we got on a particular spammer.

darren

I tried this out and it seemed to work for quick searches from the front
page of the Web UI. But when I went into the search page and did a
search on tickets created after ‘7/1/02’ and before ‘8/1/02’, 4 results
showed but the result was 49.

Does the 49 include those that have statuses of “resolved” “dead” or
“stalled”, while the 4 visible tickets only represent the new/open
tickets (“new” is what I see for these tickets)?

Is there a way to get the iterator of the visible rows, $i to print the
count of the search results?

Thanks!

Colleen

Has anyone ever used this snippet of code (below) and gotten the number
of search results to work for a query like “created before xx/xx/xx” and
“Created after xx/xx/xx”?

–colleen

-----Original Message-----
From: Colleen
Sent: Wednesday, August 14, 2002 6:20 PM
To: rt-devel@lists.fsck.com; rt-users@lists.fsck.com
Subject: getting the number of search results

From: Jesse Vincent jesse@bestpractical.com
Date: Wed, 12 Sep 2001 16:36:35 -0400


You probably want to add a <% $session{‘tickets’}->Count %> results
found
line to Search/Listing.html

We are using RT for our abuse tickets. Is there an easy way to
put
the
total number of tickets found when doing a content search? We
like to
know how many complaints we got on a particular spammer.

darren

I tried this out and it seemed to work for quick searches from the
front
page of the Web UI. But when I went into the search page and did a
search
on tickets created after ‘7/1/02’ and before ‘8/1/02’, 4 results
showed
but the result was 49.

Does the 49 include those that have statuses of “resolved” “dead” or
“stalled”, while the 4 visible tickets only represent the new/open
tickets
(“new” is what I see for these tickets)?

Is there a way to get the iterator of the visible rows, $i to print
the

Colleen wrote:

Has anyone ever used this snippet of code (below) and gotten the number
of search results to work for a query like “created before xx/xx/xx” and
“Created after xx/xx/xx”?

Works fine here. 14 tickets in the queue; I add the above
criteria and get 6 matches with “6 results found”.
Phil Homewood, Systems Janitor, www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances