[rt-users] Linking a Transaction CF value to a Ticket CF value
Kevin Falcone
falcone at bestpractical.com
Mon Jul 8 11:04:31 EDT 2013
On Mon, Jul 08, 2013 at 02:12:38AM -0700, scott.dalzell wrote:
> I have now ran the trigger by replying to a ticket and setting the
> 'Alert_Support_T CF to 'Alert' and it produced the following error
>
> *Error Log*
Unfortunately, you cut off the cause of this stack.
The line that comes after is unrelated.
It appears to be a mail sending error.
-kevin
> Stack:
> [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:487]
> [/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:292]
> [/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:114]
> [/opt/rt4/sbin/../lib/RT/ScripAction.pm:232]
> [/opt/rt4/sbin/../lib/RT/Scrip.pm:475]
> [/opt/rt4/sbin/../lib/RT/Scrips.pm:188]
> [/opt/rt4/sbin/../lib/RT/Transaction.pm:201]
> [/opt/rt4/sbin/../lib/RT/Record.pm:1504]
> [/opt/rt4/sbin/../lib/RT/Ticket.pm:2297]
> [/opt/rt4/sbin/../lib/RT/Ticket.pm:2193]
> [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:2019]
> [/opt/rt4/share/html/Ticket/Display.html:164]
> [/opt/rt4/share/html/Ticket/Update.html:300]
> [/opt/rt4/share/html/Ticket/autohandler:66]
> [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:634]
> [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:335]
> [/opt/rt4/share/html/autohandler:53]
> (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:491)
> [Mon Jul 8 09:01:35 2013] [warning]: Couldn't load object RT::Transaction
> #0 (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:2684
>
> *Script Cndition*
>
> #Set my Variables
> my $txn = $self->TransactionObj;
> my $type = $txn->Type;
> my $cf = RT::CustomField->new( $self->CurrentUser );
>
>
> #Test load CF Alert_Support_T
> my ($id, $msg) = $cf->Load("Alert_Support_T");
> unless ($id) {
> RT->Logger->error("Unable to load Alert_Support_T: $msg");
> return 0;
> }
>
> if ( $type eq 'Create' ) {
> # CF can be set on create
> return 0 unless
> $txn->Creatorobj->FirstCustomFieldValue('Alert_Support_T') eq 'LFM Support
> Required';
>
> }
> elsif ( $type eq 'CustomField' ) {
> # CF can be changed later
> my $cf = RT::CustomField->new( $self->CurrentUser );
> $cf->Load( $txn->Field );
>
> return 0 unless $cf->Name eq 'Alert_Support_T';
> return 0 unless $txn->NewValue eq 'LFM Support Required';
> } else {
> return 0;
> }
> return 1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130708/dba44f5c/attachment.sig>
More information about the rt-users
mailing list