Re: [rt-users] RT Command Line

2013-01-17 Thread Kevin Falcone
On Thu, Jan 17, 2013 at 04:16:27PM -0500, Tim Dunphy wrote:
Simple question for you. If I wanted to run the RT command line from my 
 local computer (which
is a mac), it is necessary to install the full RT first? Or is it possible 
 to download the RT
CLI separately?

You do not need all of RT, but I'm not aware of a separate packaging
for bin/rt.  You can scp your.rt.server:/opt/rt4/bin/rt down to your
Mac and then install the few non-core dependencies that it has (you can
see them listed around line 65 or so of bin/rt).

If you don't have access to your RT server, you could download the RT
tarball and take the copy of bin/rt inside it, which is configured to
use #!/usr/bin/perl.

-kevin


pgp76_O3_5bLm.pgp
Description: PGP signature


Re: [rt-users] RT Command Line

2013-01-17 Thread Tim Dunphy
Hey Kevin,

That's awesome advice. Thanks, and I'll do that. I built the RT server and
I really like working with it. Looking forward to getting more comfortable
with the command line. I hear it's a bit more limited in what it can do
than the web gui, but what it can do is allow you to process your tickets a
lot faster. And yes we have a lot of them here.

Regards,
Tim

On Thu, Jan 17, 2013 at 5:04 PM, Kevin Falcone falc...@bestpractical.comwrote:

 On Thu, Jan 17, 2013 at 04:16:27PM -0500, Tim Dunphy wrote:
 Simple question for you. If I wanted to run the RT command line from
 my local computer (which
 is a mac), it is necessary to install the full RT first? Or is it
 possible to download the RT
 CLI separately?

 You do not need all of RT, but I'm not aware of a separate packaging
 for bin/rt.  You can scp your.rt.server:/opt/rt4/bin/rt down to your
 Mac and then install the few non-core dependencies that it has (you can
 see them listed around line 65 or so of bin/rt).

 If you don't have access to your RT server, you could download the RT
 tarball and take the copy of bin/rt inside it, which is configured to
 use #!/usr/bin/perl.

 -kevin




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


Re: [rt-users] rt command line, to see all tickets updated yesterday.

2009-05-07 Thread Ruslan Zakirov
On Thu, May 7, 2009 at 9:57 PM, Jeff Palmer je...@burstek.com wrote:
 Hello,



 I’m trying to use the rt command line to get a list of all tickets that were
 modified yesterday.  I currently have:



 rt ls -t ticket Queue = 'Support' AND Status != 'rejected' AND LastUpdated
 = '2009-05-06



 It seems simple enough,  but apparently the query is larger than I had
 anticipated, because the web server times out before returning any results.

 I’m looking for ideas/optimizations, to make this faster and more reliable.

How many tickets do you have in support queue? For mysql ideal index
would be (Queue, LastUpdated), however I don't think it's the problem,
expecially if you have less than 100k tickets in the queue. Slow logs
may help you identify real bottleneck.

 As an aside,  I know I can add the –f switch to pull things like id, and
 subject.  Is there a way to pull info out of a customfield also?  An
 example:

 rt ls -t ticket Queue = 'Support' AND Status != 'rejected' AND LastUpdated
 = '$EXPIRE' -f id,subject,customfield

I don't remember exact syntax, but it's probably CustomField.{Name} or
something like that. Hope somebody come up with exact version :)


 Any help or advice would be greatly appreciated.



-- 
Best regards, Ruslan.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com