Skip Menu |

This queue is for tickets about the RT-Client-REST CPAN distribution.

Report information
The Basics
Id: 39868
Status: resolved
Priority: 0/
Queue: RT-Client-REST

People
Owner: jpierce [...] cpan.org
Requestors: tonylambiris [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: CustomFields change in RT 3.8
Date: Tue, 7 Oct 2008 14:12:20 -0500
To: bug-RT-Client-REST [...] rt.cpan.org
From: "Tony Lambiris" <tonylambiris [...] gmail.com>
With 3.8.0 and beyond, the CustomFields no longer match on "cf-", but instead use "CF.{Field Name}". I have added a block of code to Object.pm that should work with the old CF layout as well as the new layout: line 439 of Object.pm: if ($key =~ s/^cf(\.|-)//) { # Handle custom fields. if ($key =~ /\{(.*)\}/) { $key =~ tr/}{//d; } I'm not an expert perl coder, but the change to the first line now checks both "cf-" as well as "cf.", then if there are brackets around the key name, it will delete them with the following line. Thanks.
Subject: Re: [rt.cpan.org #39868] AutoReply: CustomFields change in RT 3.8
Date: Tue, 7 Oct 2008 14:21:38 -0500
To: bug-RT-Client-REST [...] rt.cpan.org
From: "Tony Lambiris" <tonylambiris [...] gmail.com>
I forgot to mention, this all worked after copying over REST.pm from RT to Forms.pm and making the appropriate modifications (renaming package to RT::Client::REST::Forms and deleting "use RT").
On Tue Oct 07 15:13:06 2008, tonylambiris@gmail.com wrote: Show quoted text
> I'm not an expert perl coder, but the change to the first line now > checks both "cf-" as well as "cf.", then if there are brackets around > the key name, it will delete them with the following line.
Thanks for your patch! It will make it into the next release.
Subject: Re: [rt.cpan.org #39868] CustomFields change in RT 3.8
Date: Fri, 10 Oct 2008 23:19:30 -0500
To: bug-RT-Client-REST [...] rt.cpan.org
From: "Tony Lambiris" <tonylambiris [...] gmail.com>
My pleasure, thanks for the great software. 2008/10/10 Dmitri Tikhonov via RT <bug-RT-Client-REST@rt.cpan.org>: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=39868 > > > On Tue Oct 07 15:13:06 2008, tonylambiris@gmail.com wrote:
>> I'm not an expert perl coder, but the change to the first line now >> checks both "cf-" as well as "cf.", then if there are brackets around >> the key name, it will delete them with the following line.
> > Thanks for your patch! It will make it into the next release. > >
On Tue Oct 07 15:13:06 2008, tonylambiris@gmail.com wrote: Show quoted text
> With 3.8.0 and beyond, the CustomFields no longer match on "cf-", but > instead use "CF.{Field Name}". I have added a block of code to > Object.pm that should work with the old CF layout as well as the new > layout: > > line 439 of Object.pm: > if ($key =~ s/^cf(\.|-)//) { # Handle custom fields. > if ($key =~ /\{(.*)\}/) { > $key =~ tr/}{//d; > }
It would be better to do something like: if( $key =~ m/^cf[-.]{?(\w+)}?/i ){ $cf = $1; }
On Tue Oct 07 15:13:06 2008, tonylambiris@gmail.com wrote: Show quoted text
> With 3.8.0 and beyond, the CustomFields no longer match on "cf-", but > instead use "CF.{Field Name}". I have added a block of code to > Object.pm that should work with the old CF layout as well as the new > layout: > > line 439 of Object.pm: > if ($key =~ s/^cf(\.|-)//) { # Handle custom fields. > if ($key =~ /\{(.*)\}/) { > $key =~ tr/}{//d; > } > > I'm not an expert perl coder, but the change to the first line now > checks both "cf-" as well as "cf.", then if there are brackets around > the key name, it will delete them with the following line. > > Thanks.
What is this for exactly? Searching via the REST client on CFs? I ask because I've not implemented any patch like this, and not encountered any relevant errors in 3.8.1.
Subject: Re: [rt.cpan.org #39868] CustomFields change in RT 3.8
Date: Thu, 30 Oct 2008 13:37:46 -0500
To: bug-RT-Client-REST [...] rt.cpan.org
From: "Tony Lambiris" <tonylambiris [...] gmail.com>
Hi... basically there was a bug in how RT matched on the # symbol... we had a CustomField that had a # at the end of it (ie: CF.Ticket-auth#) which RT was incorrectly matching on when using the REST interface. I believe they implemented the fix but not sure if that will appear in 3.8.2. Either way, in order to get the REST module working again (and to make it backwards compatible) I provided the snippet in this bug ticket. Hope that clears enough of it up for you. 2008/10/30 Jerrad Pierce via RT <bug-RT-Client-REST@rt.cpan.org>: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=39868 > > > On Tue Oct 07 15:13:06 2008, tonylambiris@gmail.com wrote:
>> With 3.8.0 and beyond, the CustomFields no longer match on "cf-", but >> instead use "CF.{Field Name}". I have added a block of code to >> Object.pm that should work with the old CF layout as well as the new >> layout: >> >> line 439 of Object.pm: >> if ($key =~ s/^cf(\.|-)//) { # Handle custom fields. >> if ($key =~ /\{(.*)\}/) { >> $key =~ tr/}{//d; >> } >> >> I'm not an expert perl coder, but the change to the first line now >> checks both "cf-" as well as "cf.", then if there are brackets around >> the key name, it will delete them with the following line. >> >> Thanks.
> > What is this for exactly? Searching via the REST client on CFs? > I ask because I've not implemented any patch like this, and not > encountered any relevant errors in 3.8.1. >
From: saxjazman9 [...] gmail.com
On Thu Oct 30 14:38:01 2008, tonylambiris@gmail.com wrote: Show quoted text
> Hi... basically there was a bug in how RT matched on the # symbol... > we had a CustomField that had a # at the end of it (ie: > CF.Ticket-auth#) which RT was incorrectly matching on when using the > REST interface. I believe they implemented the fix but not sure if > that will appear in 3.8.2. Either way, in order to get the REST module > working again (and to make it backwards compatible) I provided the > snippet in this bug ticket. > > Hope that clears enough of it up for you. > > 2008/10/30 Jerrad Pierce via RT <bug-RT-Client-REST@rt.cpan.org>:
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=39868 > > > > > On Tue Oct 07 15:13:06 2008, tonylambiris@gmail.com wrote:
> >> With 3.8.0 and beyond, the CustomFields no longer match on "cf-", but > >> instead use "CF.{Field Name}". I have added a block of code to > >> Object.pm that should work with the old CF layout as well as the new > >> layout: > >> > >> line 439 of Object.pm: > >> if ($key =~ s/^cf(\.|-)//) { # Handle custom fields. > >> if ($key =~ /\{(.*)\}/) { > >> $key =~ tr/}{//d; > >> } > >> > >> I'm not an expert perl coder, but the change to the first line now > >> checks both "cf-" as well as "cf.", then if there are brackets around > >> the key name, it will delete them with the following line. > >> > >> Thanks.
> > > > What is this for exactly? Searching via the REST client on CFs? > > I ask because I've not implemented any patch like this, and not > > encountered any relevant errors in 3.8.1. > >
Has this been fixed yet? I just tried the proposed work-around for 3.8.2 and it seems to work. You do need the new REST.pm from 3.8.2 included as Forms.pm.
Necessary changes were more extensive than just your patch. Feel free to test pre-.40 from: http://code.google.com/p/rt-client-rest/source/checkout
Hello, We've released a new version of RT::Client::REST to CPAN wich should have the issue you reported fixed. Please come back to us if you feel this issue is not solved correctly. You can find the new version at http://search.cpan.org/~jlmartin/RT-Client-REST-0.4/ Thanks, Jose Luis Martinez RT::Client::REST Co-MAINT