public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
* PATCH: Prevent 'number' from appearing twice in Gnatsweb Query Results
@ 2001-04-04 17:34 Yngve Svendsen
  0 siblings, 0 replies; only message in thread
From: Yngve Svendsen @ 2001-04-04 17:34 UTC (permalink / raw)
  To: gnats-devel

The following patch provides a workaround for the problem which causes the 
Number column to appear twice in the Query Results table.

Yngve Svendsen
IS Engineer
Clustra AS, Trondheim, Norway
yngve.svendsen@clustra.com


2001-04-05  Yngve Svendsen  <yngve.svendsen@clustra.com>

         * gnatsweb.pl (query_page): Shift 'number' out of the array of
           selectable column names (@fieldnames) to prevent user from
           selecting it. That would cause the 'number' column to be
           repeated twice, since NUMBER_FIELD is explicitly added to the
           search format in submitquery. The best solution would be to
           remove the explicit addition, but that messes up column sorting.
           However, since the only drawback of the current fix is that we
           force the inclusion of PR numbers in the query results listing,
           this doesn't seem to matter much.



Index: gnatsweb.pl
===================================================================
RCS file: /cvs/gnats/gnats/contrib/gnatsweb/gnatsweb.pl,v
retrieving revision 2.32
diff -u -p -r2.32 gnatsweb.pl
--- gnatsweb.pl	2001/04/04 23:06:09	2.32
+++ gnatsweb.pl	2001/04/05 00:16:51
@@ -1378,6 +1378,13 @@ sub query_page
          "</td>\n</tr>\n",
  	"<tr valign=top>\n<td>Column Display:</td>\n<td>";

+  # 30/Mar/2001 yngves
+  # The 'number' field is always first in the @fieldnames array.
+  # If users were allowed to select it in this list, the PR number
+  # would appear twice in the Query Results table. We prevent this
+  # by shifting 'number' out of the array.
+  shift(@fieldnames);
+
    my @lcfields;
    foreach (@fieldnames)
    {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-04-04 17:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-04 17:34 PATCH: Prevent 'number' from appearing twice in Gnatsweb Query Results Yngve Svendsen

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).