Hello,
I hope you are doing good.
I wrote a script that extract the CustomField IP values and analyze it from external sources but it happens that RTIR as far I know only parse the IPs from the IR content OnCreate and my script also analyze the IPs OnCreate.
How can I work around with this conflict?
Thank you,
Pedro Cunha
Does disaling the scrip that is setting the IP custom field from RTIR solve the issue?
Hello
No, because I need the values from CustomField IP that are being set by the scrip
I’d look to have your scrip run when the IP custom field is changed instead of on create
How can I set the scrip to be executed after the custom field is changed?
Thank you
Off the top of my head I don’t recall but it something similar to this:
my $ip_cf = RT::CustomField->new(RT->SystemUser);
my($ret, $msg) = $ip_cf->Load( 'IP' );
unless ( $ret ) {
RT::Logger->error( "Could not load IP custom field: $msg" );
return;
}
# Might also want to run for create?
return unless $self->TransactionObj->Type eq 'Set';
return unless $self->TransactionObj->Field eq $ip_cf->Id;
return 1;