RT CLI CF query operators

RT users,

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.

RT: rt.4.2
OS : RH 6.0

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.

Stack:
[/opt/rt4/sbin/…/lib/RT/Tickets.pm:2943]
[/opt/rt4/sbin/…/lib/RT/SQL.pm:172]
[/opt/rt4/sbin/…/lib/RT/Tickets.pm:2979]
[/opt/rt4/sbin/…/lib/RT/Tickets.pm:2997]
[/opt/rt4/share/html/REST/1.0/search/ticket:89]
[/opt/rt4/share/html/REST/1.0/autohandler:54]
[/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:680]
[/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:368]
[/opt/rt4/share/html/autohandler:53]
'.
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.

Stack:
[/opt/rt4/sbin/…/lib/RT/Tickets.pm:2943]
[/opt/rt4/sbin/…/lib/RT/SQL.pm:172]
[/opt/rt4/sbin/…/lib/RT/Tickets.pm:2979]
[/opt/rt4/sbin/…/lib/RT/Tickets.pm:2997]
[/opt/rt4/share/html/REST/1.0/search/ticket:89]
[/opt/rt4/share/html/REST/1.0/autohandler:54]
[/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:680]
[/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:368]
[/opt/rt4/share/html/autohandler:53]

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.

The error message says all.
It’s just a typo, the ticket field is called Created and not Create.

Chris

Loos,

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.

Stack:
[/opt/rt4/sbin/…/lib/RT/SQL.pm:130]
[/opt/rt4/sbin/…/lib/RT/Tickets.pm:2979]
[/opt/rt4/sbin/…/lib/RT/Tickets.pm:2997]
[/opt/rt4/share/html/REST/1.0/search/ticket:89]
[/opt/rt4/share/html/REST/1.0/autohandler:54]
[/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:680]
[/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:368]
[/opt/rt4/share/html/autohandler:53]
’.
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.

Stack:
[/opt/rt4/sbin/…/lib/RT/SQL.pm:130]
[/opt/rt4/sbin/…/lib/RT/Tickets.pm:2979]
[/opt/rt4/sbin/…/lib/RT/Tickets.pm:2997]
[/opt/rt4/share/html/REST/1.0/search/ticket:89]
[/opt/rt4/share/html/REST/1.0/autohandler:54]
[/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:680]
[/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:368]
[/opt/rt4/share/html/autohandler:53]

Hi,

interesting, pasting your query in the advanced query box doesn’t report
any errors for me (rt 4.2.12).

What is your RT version?

ChrisAm 29.08.2015 um 03:05 schrieb support@pureview.com:

Loos,

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.

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.

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