help-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: too many 'changed' entries


From: Dirk Schenkewitz
Subject: Re: too many 'changed' entries
Date: Fri, 28 Mar 2003 17:42:51 +0100


Mel Hatzis schrieb:
> 
> On 03/27/2003 06:04 AM, Dirk Schenkewitz submitted:
> 
> >Dirk Schenkewitz schrieb:
> >
> >
> >>Hi All,
> >>
> >>Can someone give me a hint to get rid of this:
> >>
> >>Every time a PR is edited (via Gnatsweb) it happens that stuff is noted as
> >>'changed' in the Audit-Trail, although the only "change" was the formatting,
> >>and even there the user did not change anything - all of this happens auto-
> >>matically.
> >>
> >>As an example, here is something I found in one audit-trail.
> >>/
> >>| Description-Changed-From-To: In einer Mehrfachauswahl wird auf einen 
> >>String mit einem '#D ' abgefragt. Entspricht der Wert,
> >>| verläuft zunächst alles gut. Entspricht der Wert nicht und muss er nur 
> >>überlesen werden, kommt Fehler: Variable Konstante
> >>| erwartet.
> >>| ->In einer Mehrfachauswahl wird auf einen String mit einem '#D
> >>| ' abgefragt. Entspricht der Wert, verläuft zunächst alles
> >>| gut. Entspricht der Wert nicht und muss er nur überlesen
> >>| werden, kommt Fehler: Variable Konstante erwartet.
> >>\
> >>
> >>We're using Gnatsweb v3.99.3, Gnats v4.0-beta1 (taken from the GnatsWeb
> >>display) - is this a known bug which can be removed by updating, perhaps ?
> >>Or did I make a configuration mistake ?

(browser related stuff deleted)

> >Has nobody else observed this ?
> >(Please, people, give me a hint, even if it is something obvious -
> >right now i'm just out of ideas.)
> >
> I noticed this too. In my case, I setup a field as 'required' and
> it wasn't working via gnatsweb, because gnatsweb was inserting a
> newline (thereby making the field look like it had a value).
> 
> I fixed it by changing the 'fix_multiline_val' sub, as follows:
> 
> sub fix_multiline_val
> {
>   my $val = shift;
>   $val =~ s/\r\n?/\n/g;
>   $val .= "\n" unless $val =~ /\n$/;
>   if ($val =~ /^\s*$/)
>   {
>     # don't allow whitespace values to circumvent 'required' fields
>     $val = "";
>   }
>   $val;
> }
> 
> This basically prevents whitespace only values from being entered
> as the (multiline) field value which I consider to be a good fix.

Absolutely.

> This should help you in the case where a newly created PR is edited
> for the first time - since this is when gnatsweb will add the
> newline, thereby changing the field and adding a change log to the
> audit trail.

Weird observation, perhaps pure chance and completely unrelated, but
- it seems to remove even my problem, which also happens when there
already is something in a field. I have no idea what is going on.

> Hope this helps.

It did, so far! I'm not sure if I can believe that it's gone forever.
But right now it seems to be. (Even if it comes back, now I have an
idea where to tweak things.) 
Thanks a lot, I owe you a beer, at least. :-)

Have fun
        dirk
-- 
Dirk Schenkewitz 

InterFace AG                 fon: +49 (0)89 / 610 49 - 126
Leipziger Str. 16            fax: +49 (0)89 / 610 49 - 83
D-82008 Unterhaching         
http://www.interface-ag.de   mailto:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]