Re: [rt-users] Default requestor for linked / child tickets

2016-07-28 Thread Emmanuel Lacour
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;
> 
> <%args>
>$ARGSRef => undef
> 
> 
> 


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:elac...@easter-eggs.com  -   http://www.easter-eggs.com
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Default requestor for linked / child tickets

2016-07-28 Thread Emmanuel Lacour
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;

<%args>
   $ARGSRef => undef



-- 
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:elac...@easter-eggs.com  -   http://www.easter-eggs.com
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Default requestor for linked / child tickets

2016-07-26 Thread Emmanuel Lacour
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;
  
  <%args>
  $ARGSRef => undef
  $Clone => undef
  $CloneTicketObj => undef
  


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, ...)
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Default requestor for linked / child tickets

2016-07-26 Thread Reinhold Pescoller

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
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016