[Rt-devel] PATCH: submission of '0' via REST interface
Kevin Riggle
kevinr at bestpractical.com
Mon May 1 15:45:25 EDT 2006
On Fri, Apr 28, 2006 at 11:38:10AM -0400, Jesse Vincent wrote:
> Forwarded to rt-bugs for kevin to review and apply when he's working on
> the cli internals
Hi David,
I'm afraid I can't replicate your bug -- I can set fields like Priority
and TimeWorked to non-zero values and then to zero without any problems.
Could you give me a test case I can add to the test suite?
- Kevin
>
> David Schweikert wrote:
> > Hi Jesse,
> >
> > Is it ok like this?
> >
> > Cheers
> > David
> >
> > --- RT/Interface/REST.pm 2006-04-21 15:46:18.693515000 +0200
> > +++ RT/Interface/REST.pm 2006-04-25 08:29:11.955808000 +0200
> > @@ -110,8 +110,11 @@
> > }
> > elsif ($state <= 1 && $line =~ /^($field):(?:\s+(.*))?$/) {
> > # Read a field: value specification.
> > - my $f = $1;
> > - my @v = ($2 || ());
> > + my ($f, $vtmp) = ($1, $2);
> > + # Only return the value if non-empty (so that specifying
> > + # an empty string will set the field to NULL instead of the
> > + # empty string)
> > + my @v = ($vtmp =~ /\S/ ? ($vtmp) : ());
> >
> > # Read continuation lines, if any.
> > while (@lines && ($lines[0] eq '' || $lines[0] =~ /^\s+/)) {
> >
>
>
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>
> Best Practical is hiring! Come hack Perl for us: http://bestpractical.com/about/jobs.html
--
Kevin Riggle <kevinr at bestpractical.com>
Best Practical Solutions, LLC
More information about the Rt-devel
mailing list