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
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:
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
LBNLOn 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
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
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 Crockerkfcrocker@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
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
Best regards, Ruslan.
Ruslan,
Thanks! That will be a big help.
Kenn
LBNLOn 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 Crockerkfcrocker@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
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com