[rt-users] RT CLI CF query operators

Jeffrey Pilant jeffrey.pilant at bayer.com
Tue Sep 1 13:47:22 EDT 2015


Support at pureview.com wrote:
> I trying to use RT CLI on a CF for operators and I having a hard time to
> get this working. Can any help on this. I do not know what I'm doing
> wrong.
<snip>
> rt list -i "'CF.{Modtrak}' > 0 AND Created >= '2015-07-01' AND Create <=
> '2015-07-31'"
> rt: Invalid query: 'Unknown field 'Create' in ''CF.{Modtrak}' > 0 AND
> Created >= '2015-07-01' AND Create <= '2015-07-31'' at
> /opt/rt4/sbin/../lib/RT/Tickets.pm line 2943.

And later:
> Thank you for the help but after I rectified the typo. I still getting a
> different errors.
> 
> rt list -i 'CF.{Modtrak} > 0 AND Created >= "2015-07-01" AND Created <=
> "2015-07-31"'
> rt: Invalid query: 'Wrong query, expecting a AGGREGATOR in 'CF.{Modtrak} >
> 0 AND Created >='"2015-07-01'>" AND Created <='"<--here2015-07-31'"' at
> /opt/rt4/sbin/../lib/RT/SQL.pm line 130.

When you corrected your typo, you also changed your quoting.
This can be seen by the error message retyping of your query.
Try (as one line):
   rt list -i
   "'CF.{Modtrak}' > 0 AND Created >= '2015-07-01' AND Created <= '2015-07-31'"

/jeff

________________________________________________________________________
The information contained in this e-mail is for the exclusive use of the 
intended recipient(s) and may be confidential, proprietary, and/or 
legally privileged.  Inadvertent disclosure of this message does not 
constitute a waiver of any privilege.  If you receive this message in 
error, please do not directly or indirectly use, print, copy, forward,
or disclose any part of this message.  Please also delete this e-mail 
and all copies and notify the sender.  Thank you. 

For alternate languages please go to http://bayerdisclaimer.bayerweb.com
________________________________________________________________________



More information about the rt-users mailing list