From: Robert Lupton the Good <rhl@astro.Princeton.EDU>
To: help-gnats@gnu.org
Subject: Patch for gnatsweb.pl
Date: Mon, 16 Sep 2002 06:48:00 -0000 [thread overview]
Message-ID: <15749.57217.976539.558063@wire7.Princeton.EDU> (raw)
(This is my `patch.3b')
I'd be happy to check these straight into cvs if given permission...
This patch:
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).
2/ Adds a field to the advanced query so that the
user can choose which field to sort on. This includes support
for my "custom query" patch of a few days ago (but will work
even without it)
R
*** gnatsweb.pl Mon Sep 16 09:33:23 2002
--- ../gnatsweb.pl-3 Wed Sep 11 14:11:32 2002
***************
*** 2023,2031 ****
--- 2023,2035 ----
{
my $ary_ref = fieldinfo($_, 'values');
my $size = scalar(@$ary_ref);
+ my %ary_ref_names;
+ foreach (@$ary_ref) { $ary_ref_names{"^$_\$"} = "$_"; }
+ @$ary_ref = map {"^$_\$"} @$ary_ref; # require exact matches
$size = 4 if $size > 4;
print $q->scrolling_list(-name=>$lc_fieldname,
-values=>$ary_ref,
+ -labels=>\%ary_ref_names,
-multiple=>1,
-size=>$size);
}
***************
*** 2065,2070 ****
--- 2069,2080 ----
{
@columns = @lcfields;
}
+
+ my(@sortfields) = @lcfields;
+ unshift @sortfields, "PR";
+ unshift @sortfields, "custom"
+ if(cb('sort_query', 'custom', 'checking_if_custom_sort_exists'));
+
print "<table border=1 cellspacing=0 bgcolor=$cell_bg>\n",
"<caption>Display</caption>\n",
"<tr valign=top>\n<td>Display these columns:</td>\n<td>",
***************
*** 2072,2078 ****
-values=>\@lcfields,
-defaults=>\@columns,
-multiple=>1),
! "</td>\n</tr>\n<tr>\n<td colspan=2>",
$q->checkbox_group(-name=>'displaydate',
-values=>['Display Current Date'],
-defaults=>['Display Current Date']),
--- 2082,2093 ----
-values=>\@lcfields,
-defaults=>\@columns,
-multiple=>1),
! "<tr valign=top>\n<td>Sort By:</td>\n<td>",
! $q->scrolling_list(-name=>'sortby',
! -values=>\@sortfields,
! -multiple=>0,
! -size=>1),
! "</td>\n</tr>\n<tr>\n<td colspan=2>",
$q->checkbox_group(-name=>'displaydate',
-values=>['Display Current Date'],
-defaults=>['Display Current Date']),
_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnats
next reply other threads:[~2002-09-16 13:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-16 6:48 Robert Lupton the Good [this message]
2002-09-17 9:47 ` Yngve Svendsen
2002-09-23 12:22 ` Lars Henriksen
2002-09-25 11:18 ` Lars Henriksen
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=15749.57217.976539.558063@wire7.Princeton.EDU \
--to=rhl@astro.princeton.edu \
--cc=help-gnats@gnu.org \
/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).