[rt-users] RT 3.8.10 is setting a CF value on new ticket creation?

Kevin Falcone falcone at bestpractical.com
Tue Aug 9 17:28:02 EDT 2011


On Tue, Aug 09, 2011 at 02:59:44PM -0400, Jeff Blaine wrote:
> I'm confused and can't see that I am doing anything
> wrong.  Either I *am* doing something wrong, or there's
> a really bizarre bug in 3.8.10.  Surely it's the former.

Since you don't say what the condition of the Scrip is, it's hard to
know what the TransactionObj actually is, and whether or not it's
relevant.

But without knowing more about the contents of Transactions and
ObjectCustomFieldValues I'd be guessing at problems.

-kevin

> The following scrip reports (as we expect in our specific
> test cases):
> 
>     No match, Discovery Method left alone
>     Old '' New ''
> 
> Yet the CF named 'Discovery Method' is in fact being set
> to a value when a new ticket is created.  The value set
> seems random and is not the same thing with each new
> ticket.
> 
> We have no other scrips that concern themselves with this
> field.  Does anyone have any ideas?
> 
> # ... a bunch of tests here to set Discovery Method based
> # ... on whether the ticket subject matches a regex or not
> if ($matched == 0) {
>     $RT::Logger->info("No match, Discovery Method left alone");
> }
> my $trans = $self->TransactionObj;
> my $ticket = $self->TicketObj;
> my $testcf = new RT::CustomField($RT::SystemUser);
> 
> $testcf->LoadByName(Queue => $ticket->QueueObj->id,
>                      Name => "Discovery Method");
> my $oldv = trim($self->TransactionObj->OldValue());
> my $newv = trim($self->TransactionObj->NewValue());
> $RT::Logger->info("Old '$oldv' New '$newv'");
> 
> return 1;
> --------
> RT Training Sessions (http://bestpractical.com/services/training.html)
> *  Chicago, IL, USA  September 26 & 27, 2011
> *  San Francisco, CA, USA  October 18 & 19, 2011
> *  Washington DC, USA  October 31 & November 1, 2011
> *  Melbourne VIC, Australia  November 28 & 29, 2011
> *  Barcelona, Spain  November 28 & 29, 2011
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110809/0f8c5f8f/attachment.sig>


More information about the rt-users mailing list