Help with rt-crontool query

Hi. I’m trying to have RT mail us for all unowned tickets that are 14
days or older. I am using the line below, but it seems to be emailing
me for all unowned tickets and ignoring the ‘Created’ part of the
query. Can someone please tell me what I’m doing wrong? This seems
like it should be super simple.

/opt/rt3/bin/rt-crontool --search RT::Search::FromSQL --search-arg
"Owner = ‘nobody’ AND Created > ‘13 days ago’ AND Status != ‘resolved’
AND Status != ‘rejected’" --action RT::Action::RecordComment --template
’Unowned tickets14’

Thanks

John Alberts
Hosted Services
Exlibris USA
john.alberts@exlibrisgroup.com
cell: 1-508-878-2197

John,

Your “Created” logic is in reverse. It should be:

Created < ‘13 days ago’.

What you are asking for is all tickets where the “Created” date itself has a
value less than today minus 13 days. A ticket that was created 20 days ago
would meet that criteria.

Hope this helps.

Kenn
LBNLOn Mon, Nov 15, 2010 at 9:31 AM, John Alberts < John.Alberts@exlibrisgroup.com> wrote:

Hi. I’m trying to have RT mail us for all unowned tickets that are 14
days or older. I am using the line below, but it seems to be emailing
me for all unowned tickets and ignoring the ‘Created’ part of the
query. Can someone please tell me what I’m doing wrong? This seems
like it should be super simple.

/opt/rt3/bin/rt-crontool --search RT::Search::FromSQL --search-arg
"Owner = ‘nobody’ AND Created > ‘13 days ago’ AND Status != ‘resolved’
AND Status != ‘rejected’" --action RT::Action::RecordComment --template
’Unowned tickets14’

Thanks


John Alberts
Hosted Services
Exlibris USA
john.alberts@exlibrisgroup.com
cell: 1-508-878-2197