Transaction->CustomFieldValues in scrips

Hi all,

In RT 3.4.2, I’m trying to read a transaction’s custom fields with a
scrip like:

my $Transaction = $self->TransactionObj;
my $CustomFieldValues=$Transaction->CustomFieldValues(“Name-of-CF”);
$RT::Logger->error( “Parsing transaction custom fields:”);

while (my $CustomFieldValue = $CustomFieldValues->Next) {
$RT::Logger->error( "Custom Field: ".$CustomFieldValue->Content
);
};

$RT::Logger->error( “Done!” );
return (1);

I have seen some postings about the same issue, but they all seems to
come down to that it doesn’t work.

Is that really the case?

Best Regards - Anders Ekstrand

Hi!

Anders Ekstrand �rta:

I have seen some postings about the same issue, but they all seems to
come down to that it doesn’t work.
Is that really the case?

I gave up after i did not got any response to my last post about this.
If anybody would post “Hey, it’s easy! I did it!”, i would try harder…
and i will try after every upgrade. There is Hope! :wink:

best regards,

Peter Marton

Hi!

Anders Ekstrand írta:

I have seen some postings about the same issue, but they all seems to
come down to that it doesn’t work.
Is that really the case?

I gave up after i did not got any response to my last post about this.
If anybody would post “Hey, it’s easy! I did it!”, i would try harder…
and i will try after every upgrade. There is Hope! :wink:

So, the problem is that TransactionCustomFieldValues from the web UI
are set after the transaction is created. The attached patch fixes this,
but I’m not sure it feels clean enough to put into 3.4 core.

Jesse

accessible_transaction_cfs.patch (4.26 KB)

Hi Jesse,

Many thanks!

Best Regards - Anders