Advanced search w/ a sql call

Hello,

I’d like to search for tickets created w/in the past 7 days which can be
done easily enough by creating a query where Created after some day,
“Created > ‘2010-12-13’”. I’d like to make this more dynamic so I go
into Advanced and change the Query to “Created > date_add(current_date,
interval - 7 day)” and when I apply the changes I’m left on the Advanced
query page and the format has been wiped out. Not what I was hoping for.

Are you allowed to enter straight SQL through the interface like this to
make dynamic queries? Certainly I can see why this would not be allowed
since it could lead to sql injection but I’m curious.

Also, is there a way to save such a report so I could just point to a
URL or something of that nature to fire it off? Basically my manager
wants a weekly report of all the tickets entered into RT and I’m trying
to automate the creation of the report I give him.

Thanks!

RT 3.8.8 w/mysql

Darin Perusich
Email: Darin.Perusich@ctg.com
Office: 716-888-3690
Cell: 716-807-4589

The information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material. Any
review, retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than the
intended recipient is prohibited. If you are not the intended recipient of this
message, please contact the sender and delete this material from this computer.

Hello,

I’d like to search for tickets created w/in the past 7 days which can be
done easily enough by creating a query where Created after some day,
“Created > ‘2010-12-13’”. I’d like to make this more dynamic so I go
into Advanced and change the Query to “Created > date_add(current_date,
interval - 7 day)” and when I apply the changes I’m left on the Advanced
query page and the format has been wiped out. Not what I was hoping for.

Are you allowed to enter straight SQL through the interface like this to
make dynamic queries? Certainly I can see why this would not be allowed
since it could lead to sql injection but I’m curious.

Also, is there a way to save such a report so I could just point to a
URL or something of that nature to fire it off? Basically my manager
wants a weekly report of all the tickets entered into RT and I’m trying
to automate the creation of the report I give him.

Thanks!

RT 3.8.8 w/mysql

You should be able to use something like “7 days ago” or
"-7 days" in the query.

Cheers,
Ken

Use a dashboard (suing a saved search with the time limit as Ken says) with a subscription to fire it off to your boss.

Steve-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Kenneth Marshall
Sent: 20 December 2010 17:56
To: Darin Perusich
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] advanced search w/ a sql call

On Mon, Dec 20, 2010 at 11:38:35AM -0500, Darin Perusich wrote:

Hello,

I’d like to search for tickets created w/in the past 7 days which can be
done easily enough by creating a query where Created after some day,
“Created > ‘2010-12-13’”. I’d like to make this more dynamic so I go
into Advanced and change the Query to “Created > date_add(current_date,
interval - 7 day)” and when I apply the changes I’m left on the Advanced
query page and the format has been wiped out. Not what I was hoping for.

Are you allowed to enter straight SQL through the interface like this to
make dynamic queries? Certainly I can see why this would not be allowed
since it could lead to sql injection but I’m curious.

Also, is there a way to save such a report so I could just point to a
URL or something of that nature to fire it off? Basically my manager
wants a weekly report of all the tickets entered into RT and I’m trying
to automate the creation of the report I give him.

Thanks!

RT 3.8.8 w/mysql

You should be able to use something like “7 days ago” or
"-7 days" in the query.

Cheers,
Ken

This email has been scanned by Netintelligence
http://www.netintelligence.com/email

BiP Solutions Limited is a company registered in Scotland with Company
Number SC086146 and VAT number 383030966 and having its registered
office at Medius, 60 Pacific Quay, Glasgow, G51 1DZ.

This e-mail (and any attachment) is intended only for the attention of
the addressee(s). Its unauthorised use, disclosure, storage or copying
is not permitted. If you are not the intended recipient, please destroy
all copies and inform the sender by return e-mail.
This e-mail (whether you are the sender or the recipient) may be
monitored, recorded and retained by BiP Solutions Ltd.
E-mail monitoring/ blocking software may be used, and e-mail content may
be read at any time.You have a responsibility to ensure laws are not
broken when composing or forwarding e-mails and their contents.

Steve and Ken,

This is good to know, thanks! Now I have a question about
Dashboards…how should the permissions be granted? I know this is
rather general but after reviewing the ManualDashboards page in the wiki
I’m still unclear on this. The permissions in RT always seem to make me
stumble.

These are the permissions which make the most sense to me, these are
Global Group Rights.

Everyone: SeeDashboard, SubscribeDashboard
Privileged: CreateOwnDashboard, DeleteOwnDashboard, ModifyOwnDashboard,
SeeOwnDashboard

Thank!

Darin Perusich
Email: Darin.Perusich@ctg.com
Office: 716-888-3690
Cell: 716-807-4589

-----Original Message-----
From: Steve Anderson [mailto:steve.anderson@bipsolutions.com]
Sent: Monday, December 20, 2010 12:58 PM
To: Darin Perusich
Cc: rt-users@lists.bestpractical.com
Subject: RE: [rt-users] advanced search w/ a sql call

Use a dashboard (suing a saved search with the time limit as Ken says)
with a subscription to fire it off to your boss.

Steve

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-
bounces@lists.bestpractical.com] On Behalf Of Kenneth Marshall
Sent: 20 December 2010 17:56
To: Darin Perusich
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] advanced search w/ a sql call

Hello,

I’d like to search for tickets created w/in the past 7 days which
can
be

done easily enough by creating a query where Created after some day,
“Created > ‘2010-12-13’”. I’d like to make this more dynamic so I go
into Advanced and change the Query to “Created >
date_add(current_date,
interval - 7 day)” and when I apply the changes I’m left on the
Advanced
query page and the format has been wiped out. Not what I was hoping
for.

Are you allowed to enter straight SQL through the interface like
this
to

make dynamic queries? Certainly I can see why this would not be
allowed
since it could lead to sql injection but I’m curious.

Also, is there a way to save such a report so I could just point to
a

URL or something of that nature to fire it off? Basically my manager
wants a weekly report of all the tickets entered into RT and I’m
trying
to automate the creation of the report I give him.

Thanks!

RT 3.8.8 w/mysql

You should be able to use something like “7 days ago” or
"-7 days" in the query.

Cheers,
Ken


This email has been scanned by Netintelligence
http://www.netintelligence.com/email

BiP Solutions Limited is a company registered in Scotland with Company
Number SC086146 and VAT number 383030966 and having its registered
office at Medius, 60 Pacific Quay, Glasgow, G51 1DZ.


This e-mail (and any attachment) is intended only for the attention of
the addressee(s). Its unauthorised use, disclosure, storage or copying
is not permitted. If you are not the intended recipient, please
destroy
all copies and inform the sender by return e-mail.
This e-mail (whether you are the sender or the recipient) may be
monitored, recorded and retained by BiP Solutions Ltd.
E-mail monitoring/ blocking software may be used, and e-mail content
may
be read at any time.You have a responsibility to ensure laws are not
broken when composing or forwarding e-mails and their contents.


The information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material. Any
review, retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than the
intended recipient is prohibited. If you are not the intended recipient of this
message, please contact the sender and delete this material from this computer.