From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 829 invoked from network); 16 Sep 2002 13:42:03 -0000 Received: from unknown (HELO monty-python.gnu.org) (199.232.76.173) by sources.redhat.com with SMTP; 16 Sep 2002 13:42:03 -0000 Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17qw8Z-0005ii-00; Mon, 16 Sep 2002 09:42:03 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17qw80-00058e-00 for help-gnats@gnu.org; Mon, 16 Sep 2002 09:41:28 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17qw7x-00052y-00 for help-gnats@gnu.org; Mon, 16 Sep 2002 09:41:27 -0400 Received: from claven.astro.princeton.edu ([128.112.25.10]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17qw7w-0004xm-00 for help-gnats@gnu.org; Mon, 16 Sep 2002 09:41:24 -0400 Received: from wire7.Princeton.EDU (IDENT:fP9MYCFy63VaeUxU2wrh4ji8iITseQC8@wire7 [128.112.24.203]) by claven.astro.princeton.edu (8.11.6/8.11.6) with ESMTP id g8GDfMG02513 for ; Mon, 16 Sep 2002 09:41:22 -0400 Received: (from rhl@localhost) by wire7.Princeton.EDU (8.11.6/8.11.2) id g8GDfMZ28131; Mon, 16 Sep 2002 09:41:22 -0400 From: Robert Lupton the Good MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15749.57217.976539.558063@wire7.Princeton.EDU> To: help-gnats@gnu.org Subject: Patch for gnatsweb.pl X-Mailer: VM 7.03 under Emacs 20.7.1 Sender: help-gnats-admin@gnu.org Errors-To: help-gnats-admin@gnu.org X-BeenThere: help-gnats@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General discussion about GNU GNATS List-Archive: Date: Mon, 16 Sep 2002 06:48:00 -0000 X-SW-Source: 2002-q3/txt/msg00083.txt.bz2 (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 "\n", "\n", "\n\n\n\n\n\n\n\n\n\n
Display
Display these columns:", *************** *** 2072,2078 **** -values=>\@lcfields, -defaults=>\@columns, -multiple=>1), ! "
", $q->checkbox_group(-name=>'displaydate', -values=>['Display Current Date'], -defaults=>['Display Current Date']), --- 2082,2093 ---- -values=>\@lcfields, -defaults=>\@columns, -multiple=>1), ! "
Sort By:", ! $q->scrolling_list(-name=>'sortby', ! -values=>\@sortfields, ! -multiple=>0, ! -size=>1), ! "
", $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