Re: [rt-users] Reminders still open after a ticket is closed

2009-02-14 Thread Jim Tambling
Thanks Mark,
 
Tried that but it still doesn't work. Will try it next week when we
upgrade to 3.8.2.
 
Regards, Jim

-Original Message-
From: Roedel, Mark [mailto:markroe...@letu.edu] 
Sent: 12 February 2009 18:09
To: Jim Tambling; rt-us...@bestpractical.com
Subject: RE: [rt-users] Reminders still open after a ticket is
closed



That part of it looks OK to me.

 

I recently had a problem with a similarly-structured scrip that
didn't seem to be firing.  It turned out to be because I'd left the
Custom Action Preparation Code field blank.  When I put a return 1;
into that field, it started behaving as expected.

 

 

--

Mark Roedel

Senior Programmer/Analyst - Web Services

LeTourneau University

 

From: Jim Tambling [mailto:jim.tambl...@datatote.co.uk] 
Sent: Wednesday, February 11, 2009 4:36 PM
To: Roedel, Mark; rt-us...@bestpractical.com
Subject: RE: [rt-users] Reminders still open after a ticket is
closed

 

Thanks Mark

 

I tried that but it doesn't seem to work. Here's the code I put
in the scrip;

 

my $tickets = new RT::Tickets(RT-SystemUser)

my $id = $self-TicketObj-id;

my $queue = $self-TicketObj-QueueObj-Name;

 

return 1 unless (defined($id)); # Can this be undefined?

 

 $tickets-FromSQL('Type = reminder AND RefersTo='.$id.'');

 while (my $ticket = $tickets-Next) {

 $RT::Logger-info(Closing associated reminder);

 $ticket-SetStatus(resolved); 

}

 return 1; 

 

 

I have zero knowledge of  perl so I don't know if this is
correct.

 

Regards

 

-Original Message-
From: Roedel, Mark [mailto:markroe...@letu.edu] 
Sent: 10 February 2009 23:04
To: Jim Tambling; rt-us...@bestpractical.com
Subject: RE: [rt-users] Reminders still open after a ticket is
closed

 

Looks to me like
http://wiki.bestpractical.com/view/OnQueueChangeFixReminders
http://wiki.bestpractical.com/view/OnQueueChangeFixReminders  should
get you most of the way there as a jumping-off point.  Obviously, you'd
change the scrip condition to On Resolve and you'd use a
$ticket-SetStatus('resolved') call in place of the
$Ticket-SetQueue($queue) in the while loop...

 

--

Mark Roedel

Senior Programmer/Analyst - Web Services

LeTourneau University

 

From: rt-users-boun...@lists.bestpractical.com
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Jim
Tambling
Sent: Tuesday, February 10, 2009 4:37 PM
To: rt-us...@bestpractical.com
Subject: [rt-users] Reminders still open after a ticket is
closed

 

If I set a reminder for a ticket, after the ticket is resolved
the reminder is still active. Is there anyway to automate closing the
reminders on resolution of the ticket?

 

Regards






Spam
http://antispam.letu.edu/canit/b.php?i=29100855m=be36942b459fc=s 
Not spam
http://antispam.letu.edu/canit/b.php?i=29100855m=be36942b459fc=n 
Forget previous vote
http://antispam.letu.edu/canit/b.php?i=29100855m=be36942b459fc=f 

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.234 / Virus Database: 270.10.23/1948 - Release
Date: 02/12/09 07:20:00


___
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

Re: [rt-users] Reminders still open after a ticket is closed

2009-02-12 Thread Roedel, Mark
That part of it looks OK to me.

 

I recently had a problem with a similarly-structured scrip that didn't
seem to be firing.  It turned out to be because I'd left the Custom
Action Preparation Code field blank.  When I put a return 1; into
that field, it started behaving as expected.

 

 

--

Mark Roedel

Senior Programmer/Analyst - Web Services

LeTourneau University

 

From: Jim Tambling [mailto:jim.tambl...@datatote.co.uk] 
Sent: Wednesday, February 11, 2009 4:36 PM
To: Roedel, Mark; rt-us...@bestpractical.com
Subject: RE: [rt-users] Reminders still open after a ticket is closed

 

Thanks Mark

 

I tried that but it doesn't seem to work. Here's the code I put in the
scrip;

 

my $tickets = new RT::Tickets(RT-SystemUser)

my $id = $self-TicketObj-id;

my $queue = $self-TicketObj-QueueObj-Name;

 

return 1 unless (defined($id)); # Can this be undefined?

 

 $tickets-FromSQL('Type = reminder AND RefersTo='.$id.'');

 while (my $ticket = $tickets-Next) {

 $RT::Logger-info(Closing associated reminder);

 $ticket-SetStatus(resolved); 

}

 return 1; 

 

 

I have zero knowledge of  perl so I don't know if this is correct.

 

Regards

 

-Original Message-
From: Roedel, Mark [mailto:markroe...@letu.edu] 
Sent: 10 February 2009 23:04
To: Jim Tambling; rt-us...@bestpractical.com
Subject: RE: [rt-users] Reminders still open after a ticket is closed

 

Looks to me like
http://wiki.bestpractical.com/view/OnQueueChangeFixReminders
http://wiki.bestpractical.com/view/OnQueueChangeFixReminders  should
get you most of the way there as a jumping-off point.  Obviously, you'd
change the scrip condition to On Resolve and you'd use a
$ticket-SetStatus('resolved') call in place of the
$Ticket-SetQueue($queue) in the while loop...

 

--

Mark Roedel

Senior Programmer/Analyst - Web Services

LeTourneau University

 

From: rt-users-boun...@lists.bestpractical.com
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Jim
Tambling
Sent: Tuesday, February 10, 2009 4:37 PM
To: rt-us...@bestpractical.com
Subject: [rt-users] Reminders still open after a ticket is closed

 

If I set a reminder for a ticket, after the ticket is resolved the
reminder is still active. Is there anyway to automate closing the
reminders on resolution of the ticket?

 

Regards




Spam
http://antispam.letu.edu/canit/b.php?i=29100855m=be36942b459fc=s 
Not spam
http://antispam.letu.edu/canit/b.php?i=29100855m=be36942b459fc=n 
Forget previous vote
http://antispam.letu.edu/canit/b.php?i=29100855m=be36942b459fc=f 

___
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

Re: [rt-users] Reminders still open after a ticket is closed

2009-02-11 Thread Jim Tambling
Thanks Mark

 

I tried that but it doesn't seem to work. Here's the code I put in the
scrip;

 

my $tickets = new RT::Tickets(RT-SystemUser)

my $id = $self-TicketObj-id;

my $queue = $self-TicketObj-QueueObj-Name;

 

return 1 unless (defined($id)); # Can this be undefined?

 

 $tickets-FromSQL('Type = reminder AND RefersTo='.$id.'');

 while (my $ticket = $tickets-Next) {

 $RT::Logger-info(Closing associated reminder);

 $ticket-SetStatus(resolved); 

}

 return 1; 

 

 

I have zero knowledge of  perl so I don't know if this is correct.

 

Regards

 

-Original Message-
From: Roedel, Mark [mailto:markroe...@letu.edu] 
Sent: 10 February 2009 23:04
To: Jim Tambling; rt-us...@bestpractical.com
Subject: RE: [rt-users] Reminders still open after a ticket is closed

 

Looks to me like
http://wiki.bestpractical.com/view/OnQueueChangeFixReminders
http://wiki.bestpractical.com/view/OnQueueChangeFixReminders  should
get you most of the way there as a jumping-off point.  Obviously, you'd
change the scrip condition to On Resolve and you'd use a
$ticket-SetStatus('resolved') call in place of the
$Ticket-SetQueue($queue) in the while loop...

 

--

Mark Roedel

Senior Programmer/Analyst - Web Services

LeTourneau University

 

From: rt-users-boun...@lists.bestpractical.com
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Jim
Tambling
Sent: Tuesday, February 10, 2009 4:37 PM
To: rt-us...@bestpractical.com
Subject: [rt-users] Reminders still open after a ticket is closed

 

If I set a reminder for a ticket, after the ticket is resolved the
reminder is still active. Is there anyway to automate closing the
reminders on resolution of the ticket?

 

Regards

___
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

[rt-users] Reminders still open after a ticket is closed

2009-02-10 Thread Jim Tambling
If I set a reminder for a ticket, after the ticket is resolved the
reminder is still active. Is there anyway to automate closing the
reminders on resolution of the ticket?

 

Regards

___
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

Re: [rt-users] Reminders still open after a ticket is closed

2009-02-10 Thread Roedel, Mark
Looks to me like
http://wiki.bestpractical.com/view/OnQueueChangeFixReminders
http://wiki.bestpractical.com/view/OnQueueChangeFixReminders  should
get you most of the way there as a jumping-off point.  Obviously, you'd
change the scrip condition to On Resolve and you'd use a
$ticket-SetStatus('resolved') call in place of the
$Ticket-SetQueue($queue) in the while loop...

 

--

Mark Roedel

Senior Programmer/Analyst - Web Services

LeTourneau University

 

From: rt-users-boun...@lists.bestpractical.com
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Jim
Tambling
Sent: Tuesday, February 10, 2009 4:37 PM
To: rt-us...@bestpractical.com
Subject: [rt-users] Reminders still open after a ticket is closed

 

If I set a reminder for a ticket, after the ticket is resolved the
reminder is still active. Is there anyway to automate closing the
reminders on resolution of the ticket?

 

Regards

___
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