public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
From: Lars Henriksen <Lars.Henriksen@netman.dk>
To: Robert Lupton the Good <rhl@astro.Princeton.EDU>
Cc: help-gnats@gnu.org, Yngve Svendsen <yngve.svendsen@sun.com>
Subject: Re: Patch for gnatsweb.pl
Date: Wed, 25 Sep 2002 11:18:00 -0000	[thread overview]
Message-ID: <20020925153941.GD1135030@cluster2.netman.dk> (raw)
In-Reply-To: <20020922184733.GA1071317@cluster2.netman.dk>

Hello,

Since no one else will, I'll comment myself ;-)

On Sun, Sep 22, 2002 at 08:47:33PM +0200, Lars Henriksen wrote:
> On Mon, Sep 16, 2002 at 09:41:21AM -0400, Robert Lupton the Good wrote:
> 
> > (This is my `patch.3b')
> [snip]
> > 	1/ requires exact matches for field names selected using
> > scrolling lists.  For example, we have a "Scheduled" field that
> > has entries "approved" and "notapproved"; without this patch
> > selecting "approved" gets "notapproved" too.  The reason is that
> > gnatsweb uses a ~ match in its query, and this seems reasonable.
> > 
> > This patch adds explicit "^" and "$" to the fields, and then
> > adds code so that the user doesn't see them (Note: this doesn't
> > work very elegantly with my "load stored query" patch that
> > I sent to the list a few days ago.  This problem is fixed in
> > a later patch that I'll send today).
> 
> This is a clever trick, but I believe there is more to it.

I've realised that there is even more to it than I thought at first.

Robert Lupton's patch as well as mine breaks backward compatibility:
bookmarked and stored queries may stop working or behave differently.

According to comments in the gnatsweb code, that is also what has kept
the parameter/field/lower/upper case confusion from being dealt with and
field2param() and param2field() from disappearing. I have spent some
time on figuring out the use of (dbconfig) field names versus form
parameter (lower case) versions. It is not too difficult to eliminate
the parameter/field conversion entirely and use dbconfig names (I have
a patch) but again, not without breaking some existing bookmarked and
stored queries.

Do we want to (must we) keep backward combatibility? With gnatsweb 3.*?
With earlier gnatsweb 4 versions? As far as I can see from some bookmarks
produced by 3.113, compatibility with that version is already broken
(I have seen some "arrivedbefore=" or "modifiedafter=" query parameters
that are not recognised by gnatsweb 4).

Are we stuck with the broken logic in the following piece of code which
means that list selection on the advanced query page is interpreted
as a regular expression match whereas list selection on the query page
is interpreted as a string match (e.g. selecting state = critical will also
return non-critical from the advanced query page, but not from the query
page)?

> This affects the following piece of code in submitquery():
> 
>             # Most (?) people expect queries on enums to be of the
>             # exact, not the substring type.
>             if (fieldinfo($field, 'fieldtype') =~ "enum|multienum")
>             {
>               $subexp = appendexpr ($subexp, '|', "$ucfield==\"$sval\"");
>             }
>             else
>             {
>               $subexp = appendexpr ($subexp, '|', "$ucfield~\"$sval\"");
>             }
> 
> ...
> The upshot is that the if-clause is taken from query_page() (except for
> Synopsis), the else-clause from advanced_query_page() whether the field
> type is enumerated or not. If that was the intention, the comments and the
> if-expression are misleading to put it mildly!

What do you think?

Lars Henriksen


_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnats

  reply	other threads:[~2002-09-25 15:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-16  6:48 Robert Lupton the Good
2002-09-17  9:47 ` Yngve Svendsen
2002-09-23 12:22 ` Lars Henriksen
2002-09-25 11:18   ` Lars Henriksen [this message]
2002-09-25 11:43     ` Yngve Svendsen
2002-09-25 13:13       ` Lars Henriksen
2002-09-26 15:46         ` Robert Lupton the Good
2002-09-27  0:32         ` Robert Lupton the Good
2002-09-30  2:07         ` Lars Henriksen
     [not found] <20020915103254.22538.88942.Mailman@monty-python.gnu.org>
2002-09-16  6:56 ` Robert Lupton the Good
2002-09-16  7:24 ` patch " Robert Lupton the Good
2002-09-16  7:45 ` Robert Lupton the Good
  -- strict thread matches above, loose matches on Subject: below --
2002-09-16  6:46 Patch " Robert Lupton the Good
2001-09-06 14:09 patch " David, Lysander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020925153941.GD1135030@cluster2.netman.dk \
    --to=lars.henriksen@netman.dk \
    --cc=help-gnats@gnu.org \
    --cc=rhl@astro.Princeton.EDU \
    --cc=yngve.svendsen@sun.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).