Finding tickets that have never been worked on

Hi all,

I’d like to be able to find tickets that have never been worked on,
but am having difficulty doing so. In this case, no work means no
replies sent to the user. I had not luck searching the list archives
or wiki, but stumbled into TicketSQL on the wiki when researching
something else and it seems to indicate that I ought to be able to
search for: Told = NULL

The proper SQL equivalent works fine on the database directly,
but in RT 3.8.2 the search results returns 0 tickets…

Cambridge Energy Alliance: Save money. Save the planet.

Is valid for you the next query?

Status != ‘resolved’ AND Started = ‘null’

Best regards,

Alberto Villanueva
Industria

C/Campezo, 1, Edificio 1, Planta 4
28022 Madrid, Spain
Tel : + 34 91 550 41 00
Fax: + 34 91 415 61 53

www.altran.es

Antes de imprimir este mensaje, asegúrate de que es necesario.
Proteger el medio ambiente está también en tu mano.
En cumplimiento de la Ley Orgánica 15/1999, con fecha 13 de
diciembre, de Protección de Datos de Carácter Personal, y la Ley
34/2002, con fecha 11 de julio, de Servicios de la Sociedad de la
Información y de comercio electrónico, le comunicamos que su
dirección de correo electrónico forma parte de un fichero del que
es responsable Altran España, y que garantiza la confidencialidad
y seguridad de sus datos. Tiene usted derecho al acceso,
rectificación y cancelación de sus datos en los términos
establecidos en la Ley Orgánica 15/1999 de Protección de Datos de
Carácter Personal y demás normativa concordante, dirigiéndose a
nuestra dirección anteriormente señalada o por medio de correo
electrónico: comunicacion@altran.es.

AVISO LEGAL: Este mensaje, junto con cualquier fichero adjunto,
está dirigido a su destinatario y es confidencial. Cualquier
distribución, uso o reproducción sin consentimiento del remitente
está estrictamente prohibido. Si ha recibido este mensaje por
error, por favor proceda a ponerlo en conocimiento del remitente
por e-mail y a borrarlo de su sistema sin realizar copias.

Hi all,

I’d like to be able to find tickets that have never been worked on,
but am having difficulty doing so. In this case, no work means no
replies sent to the user. I had not luck searching the list archives
or wiki, but stumbled into TicketSQL on the wiki when researching
something else and it seems to indicate that I ought to be able to
search for: Told = NULL

Jerrad

The syntax you want is “Told is ‘NULL’” but right now the code that
builds date clauses doesn’t treat ‘is’ as a valid operator, so there
would need to be some patching to build the query you want.

-kevin

Is valid for you the next query?
Nope. 0 tickets returned, when there should be a few dozen.

Cambridge Energy Alliance: Save money. Save the planet.

Jerrad,

Try something like this:

my $ticket = $self->TicketObj;
my $comments = $ticket->$Transactions->Limit( FIELD => ‘Type’, VALUE =>
‘Comment’ );
my $replies = $ticket->$Transactions->Limit( FIELD => ‘Type’, VALUE =>
‘Correspond’ );

return 0 unless ($ticket->Status = ‘new’ &&
$comments &&
$replies);

I don’t have a scrip like this, so I’m sure my syntax if off, but if you
write one with this concept in mind, that might do it. This should give
you any ticket that is new and has NOt had any comments or corresponence
in it’s history.
Hope this helps.

Kenn
LBNLOn 7/17/2009 11:00 PM, Jerrad Pierce wrote:

Hi all,

I’d like to be able to find tickets that have never been worked on,
but am having difficulty doing so. In this case, no work means no
replies sent to the user. I had not luck searching the list archives
or wiki, but stumbled into TicketSQL on the wiki when researching
something else and it seems to indicate that I ought to be able to
search for: Told = NULL

The proper SQL equivalent works fine on the database directly,
but in RT 3.8.2 the search results returns 0 tickets…