[rt-users] Setting LastUpdatedBy in a scrip

Torsten Brumm torsten.brumm at googlemail.com
Sat Jun 19 17:21:29 EDT 2010


>From wiki: http://wiki.bestpractical.com/view/WriteCustomActionHow to be
silent

Now you put SetXxxx calls all over the places in RT and suddenly note that
strange transactions appear in tickets. They have creator
RT_System<http://wiki.bestpractical.com/view/RT_System>and describe
what you've done with your scrips. Sometimes it's better to be
silent and not mislead users. These transactions also go through the steps
described earlier and could trigger some conditions too. *Just use the long
form of SetXxx functions:*

$TicketObj->_Set(Field => 'Priority', Value => 90, RecordTransaction => 0);

Could work this way!

Torsten

2010/6/19 Jason Maderios <jmaderios at kpu.net>

>  I tried that
>
>
> my ( $st, $msg ) = $self->TicketObj->SetSubject ("\($cftype - $cfphone\)
> $csubj", RecordTransaction => 0 );
>
> But I still get:
>
> Sat Jun 19 11:57:25 2010 The RT System itself - Subject changed from (no
> value) to '( DSL- 5551212) '
>
> For some reason the transaction still shows up
>
>
>
>  *From:* Torsten Brumm <torsten.brumm at googlemail.com>
> *Sent:* Saturday, June 19, 2010 11:07 AM
> *To:* Jason Maderios <jmaderios at kpu.net>
> *Cc:* rt-users at lists.bestpractical.com
> *Subject:* Re: [rt-users] Setting LastUpdatedBy in a scrip
>
> I have no idea about your scrip, but in most cases you can use
> RecordTransaction=0 (search the wiki for correct syntax)
>
> Torsten
>
> 2010/6/19 Jason Maderios <jmaderios at kpu.net>
>
>>  All,
>>
>> I have scrips that update information in custom fields on each transaction
>> on a ticket.
>>
>> The scrips work great however they always set LastUpdatedBy to RT_System.
>> How can I set the LastUpdatedBy to the actual user working the ticket at the
>> end of the scrip?
>>
>> Regards,
>>
>> Jason Maderios
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>> Buy a copy at http://rtbook.bestpractical.com
>>
>
>
>
> --
> MFG
>
> Torsten Brumm
>
> http://www.brumm.me
> http://www.elektrofeld.de
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>



-- 
MFG

Torsten Brumm

http://www.brumm.me
http://www.elektrofeld.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100619/5c3b7b95/attachment.htm>


More information about the rt-users mailing list