[rt-users] Skipping Owner Change Notification on newly created tickets.

Traiano Welcome traiano at gmail.com
Mon Sep 1 04:21:20 EDT 2008


Hi Gene

Thanks for the response. Where would be the best place to make this
modification? Looking at the code in "Ticket_Overlay.pm" I can't seem to
spot how best to integrate it.

Also, how would I implement this in the scrip. For reference, my custom
cleanup code looks as follows (copied almost verbatim from the bestpractical
wiki article to set default owner on ticket create"):

--
my $MyUser = "traiano";
my $QueueName = "Test";
return 1 unless $self->TicketObj->QueueObj->Name eq $QueueName;
my $Actor = $self->TransactionObj->Creator;
return 1 if $Actor == $RT::SystemUser->id;
return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;
$RT::Logger->info("Auto assigning ticket #". $self->TicketObj->id ." to user
$MyUser" );
my ($status, $msg) = $self->TicketObj->SetOwner( $MyUser );
unless( $status ) {
  $RT::Logger->warning( "Impossible to assign the ticket to $MyUser: $msg"
);
return undef;
}
1;
---


Many Thanks,
Traiano




On Fri, Aug 29, 2008 at 5:12 PM, Gene LeDuc <gleduc at mail.sdsu.edu> wrote:

> Hi Traiano,
>
> You can set the new owner without recording the transaction.  If the
> transaction doesn't get recorded then it can't trigger any scrips.
>
> $Ticket->_Set(Field=>'Owner', Value=>$newowner, RecordTransaction=>0);
>
> Regards,
> Gene
>
>
> At 02:48 AM 8/29/2008, Traiano Welcome wrote:
>
>> Hi All
>>
>> I  have a scrip which automatically changes the owner from "Nobody" to
>> another user when a new ticket is created in that queue, i.e it sets the
>> default queue owner. Normally, the stock-standard
>> notify-on-queue-owner-change scrip that runs after it would notify the new
>> owner of the ticket allocation. My question is:
>> Is there a way to turn off this notification  to the default owner of the
>> queue in this specific case, (i.e only when ticket has been assigned it's
>> default owner from previously being owned by Nobody?). And, can this be done
>> without breaking future upgrades of the RT3 installation?
>>
>> Thanks in Advance,
>> Traiano Welcome
>>
>
>
> --
> Gene LeDuc, GSEC
> Security Analyst
> San Diego State University
>



-- 

There is no Spoon.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20080901/8a3c982f/attachment.htm>


More information about the rt-users mailing list