[rt-users] Help with Old Status value

Ken Crocker kfcrocker at lbl.gov
Thu Jun 18 15:25:37 EDT 2009


Ruslan,

    Thanks! That will be a big help.

Kenn
LBNL

On 6/18/2009 12:01 PM, Ruslan Zakirov wrote:
> my ($status, $msg) = $self->TicketObj->SetStatus(
> $transaction_object->OldValue );
> unless ( $status ) {
>     $RT::Logger->error( "Couldn't set status: $msg" );
>     return 0;
> }
>
> On Thu, Jun 18, 2009 at 10:02 PM, Ken Crocker<kfcrocker at lbl.gov> wrote:
>   
>> Raed,
>>
>> HA! I'm not surprised, being a perl newbie. First, I've set the
>> condition to check if the user is "resolving" the ticket (working).
>> Then, I'm examining a CF to see if it has a value, which is working. If
>> the CF has no value then I want to re-set the Ticket Status back to what
>> it was. The simple thing would be to make the CF "Mandatory". However, I
>> can't do that as my users rarely know what to put into the CF until they
>> are about to resolve it. So, I need to check the CF at that point and if
>> no value, not let them "resolve" the ticket. Any ideas?
>>
>> Kenn
>> LBNL
>>
>> On 6/18/2009 10:32 AM, Raed El-Hames wrote:
>>     
>>> Ken;
>>>
>>> In the nicest possible way you got this wrong by a mile, what are you
>>> trying to do, ist a scrip action ? do you want to reset the Status as
>>> soon as its changed to something else? or at a later transaction ie
>>> new update or modify etc?
>>>
>>> Roy
>>>
>>>
>>>
>>> Ken Crocker wrote:
>>>       
>>>> To List,
>>>>
>>>> I'm trying to get the old value of the ticket status so I can re-set
>>>> it. So far, I have this:
>>>>
>>>> my $trans = $self->TransactionObj;
>>>> my $oldvalue = $trans->Field('Status');
>>>> $oldvalue->Load($trans->OldValue );
>>>>
>>>> and it's not working. Can anyone help? Thanks.
>>>>
>>>> Kenn
>>>> LBNL
>>>> _______________________________________________
>>>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>>>
>>>> Community help: http://wiki.bestpractical.com
>>>> Commercial support: sales at bestpractical.com
>>>>
>>>>
>>>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>>>> Buy a copy at http://rtbook.bestpractical.com
>>>>
>>>>         
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> Community help: http://wiki.bestpractical.com
>> Commercial support: sales at bestpractical.com
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>> Buy a copy at http://rtbook.bestpractical.com
>>
>>     
>
>
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090618/39664bcc/attachment.htm>


More information about the rt-users mailing list