Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Users

Searching for a tickets with a filename

 

 

Request Tracker users RSS feed   Index | Next | Previous | View Threaded


robert at robertblackwell

Sep 13, 2012, 7:31 AM

Post #1 of 4 (301 views)
Permalink
Searching for a tickets with a filename

Hello,

I have a problem where I need to search for tickets by attached file name.
I am doing this currently by doing a SQL search against the database.

Is there a way to do this via the API that I am missing?

Thanks
Robert

--------
Final RT training for 2012 in Atlanta, GA - October 23 & 24
http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


trs at bestpractical

Sep 13, 2012, 9:37 AM

Post #2 of 4 (292 views)
Permalink
Re: Searching for a tickets with a filename [In reply to]

On 09/13/2012 07:31 AM, Robert Blackwell wrote:
> I have a problem where I need to search for tickets by attached file name.
> I am doing this currently by doing a SQL search against the database.
>
> Is there a way to do this via the API that I am missing?

The Query Builder and hence TicketSQL support Filename:

Queue = 'rt3' and Filename LIKE '.patch' and Status != 'resolved'

for example. You use $tickets->FromSQL(...) for TicketSQL via the API.

You'll probably want to add an index against Filename if you can for
better performance, but EXPLAIN your queries to see if that's necessary
and how much it helps.

--------
Final RT training for 2012 in Atlanta, GA - October 23 & 24
http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


robert at robertblackwell

Sep 13, 2012, 9:53 AM

Post #3 of 4 (293 views)
Permalink
Re: Searching for a tickets with a filename [In reply to]

This works great!

Is this a supported field in simple search?

Ex:

Filename:filename.txt

Robert
On Thu, Sep 13, 2012 at 12:37 PM, Thomas Sibley <trs [at] bestpractical> wrote:
> On 09/13/2012 07:31 AM, Robert Blackwell wrote:
>> I have a problem where I need to search for tickets by attached file name.
>> I am doing this currently by doing a SQL search against the database.
>>
>> Is there a way to do this via the API that I am missing?
>
> The Query Builder and hence TicketSQL support Filename:
>
> Queue = 'rt3' and Filename LIKE '.patch' and Status != 'resolved'
>
> for example. You use $tickets->FromSQL(...) for TicketSQL via the API.
>
> You'll probably want to add an index against Filename if you can for
> better performance, but EXPLAIN your queries to see if that's necessary
> and how much it helps.
>
> --------
> Final RT training for 2012 in Atlanta, GA - October 23 & 24
> http://bestpractical.com/training
>
> We're hiring! http://bestpractical.com/jobs

--------
Final RT training for 2012 in Atlanta, GA - October 23 & 24
http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


trs at bestpractical

Sep 13, 2012, 11:25 AM

Post #4 of 4 (292 views)
Permalink
Re: Searching for a tickets with a filename [In reply to]

On 09/13/2012 09:53 AM, Robert Blackwell wrote:
> This works great!
>
> Is this a supported field in simple search?
>
> Ex:
>
> Filename:filename.txt

It isn't. The simple search (RT::Search::Googleish) is designed to be
cleanly extendable however, and adding support for it would be a fairly
simple overlay.


--------
Final RT training for 2012 in Atlanta, GA - October 23 & 24
http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs

Request Tracker users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.