Default requestor for linked / child tickets

Hi All,

I have this question. Default rt sets for a new linked ticket (depend on
or child ticket ) as requestor the requestor of the parent ticket. I
would like to set the owner email address as requestor for the new child
ticket.

Where can I change this behavior?

best regars

Le 26/07/2016 � 12:32, Reinhold Pescoller a �crit :

Hi All,

I have this question. Default rt sets for a new linked ticket (depend on
or child ticket ) as requestor the requestor of the parent ticket. I
would like to set the owner email address as requestor for the new child
ticket.

Where can I change this behavior?

use the following callback (example, untested):

rt/local/html/Callbacks/YourOrg/Ticket/Create.html/MassageClone

<%init>
$$Clone->{Requestors} = $CloneTicketObj->OwnerObj->EmailAddress;
</%init>
<%args>
$ARGSRef => undef
$Clone => undef
$CloneTicketObj => undef
</%args>

you have to customize it to your needs and add error checking (what if
there is no owner or if owner has no email address, …)

Le 28/07/2016 � 09:23, Reinhold Pescoller a �crit :

it should works (it works here). What version of RT are you using. Can
you send me the full error log?

I see that your callback is named “MassageCloneArgs”. Is this a typo in
this email, there is no “Args” at the end.

I use version 4.4.0.

In my Create.html i found this name:

$m->callback( CallbackName => ‘MassageCloneArgs’, ARGSRef => $clone,
Queue => $Queue );

I see, I used a self made callback:

$m->callback( CallbackName => “MassageClone”, Clone => $clone,
CloneTicketObj => $CloneTicketObj, ARGSRef => %ARGS );

Which pass the original ticketobj, so with the new standard
MassageCloneArgs, the code should looks like:

<%init>
my $CloneTicketObj = LoadTicket( $$DECODED_ARGS{‘CloneTicket’} );
$$ARGSRef{Requestors} = $CloneTicketObj->OwnerObj->EmailAddress;
</%init>
<%args>
$ARGSRef => undef
</%args>

Easter-eggs Sp�cialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - M�tro Gait�
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com

Le 28/07/2016 � 09:47, Emmanuel Lacour a �crit :

I see, I used a self made callback:

$m->callback( CallbackName => “MassageClone”, Clone => $clone,
CloneTicketObj => $CloneTicketObj, ARGSRef => %ARGS );

Which pass the original ticketobj, so with the new standard
MassageCloneArgs, the code should looks like:

<%init>
my $CloneTicketObj = LoadTicket( $$DECODED_ARGS{‘CloneTicket’} );
$$ARGSRef{Requestors} = $CloneTicketObj->OwnerObj->EmailAddress;
</%init>
<%args>
$ARGSRef => undef
</%args>

for the record:

https://issues.bestpractical.com/Ticket/Display.html?id=32212

Easter-eggs Sp�cialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - M�tro Gait�
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com