Closed Bug 125798 Opened 23 years ago Closed 22 years ago

move buglist sub-routines into re-usable module

Categories

(Bugzilla :: Query/Bug List, defect, P2)

2.10
defect

Tracking

()

RESOLVED DUPLICATE of bug 158474

People

(Reporter: jayvdb, Assigned: endico)

References

Details

Attachments

(2 files)

The logic behind converting a query into a buglist is contained within
buglist.cgi.  This makes the CGI larger than necessary, and blocks issues which
require manipulation of stored queries.  Some bugs which would benefit from this
include:

Bug 65393: Editing stored query
Bug 69000: Group and system stored queries
Bug 95722: [RFE] Separate queries and buglists
Bug 105491: Move graphing into the DB

I have a patch against 2.15 in use at our site, which will need refreshing after
bug 103778.
adding dependency on bug 103778, per comments.  It just got checked in, btw. :-)
Depends on: 103778
Attached patch Query.pmSplinter Review
Query.pm contains all re-usable content from buglist.cgi, as required to
extract a named query and generate a custom report.  Sample usage follows.

#!/usr/bin/perl
require "CGI.pl";
use Query;
die "Invalid parameter query" if ! $::FORM{'query'};
print "Content-type: text/plain\n\n";
my $url = Query::LookupNamedQuery("Release Blockers");
print "URL: $url\n";
my $columns = Query::GetColumns();
my @selectcolumns = ("id", "summary");
my @selectnames = map($columns->{$_}->{'name'}, @selectcolumns);
my $query = Query::GenerateSQL(\@selectnames, $url);
print "Query: $query\n";
ConnectToDatabase();
SendSQL($query);
print "Results:\n";
while (my @row = FetchSQLData()) {
  print "@row\n"
}
Blocks: 92676
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.18
This was done in bug 158474

*** This bug has been marked as a duplicate of 158474 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Well, there's probably more to John's patch than I did over in bug 158474...

Gerv
clearing target in DUPLICATE/WORKSFORME/INVALID/WONTFIX bugs so they'll show up
as untriaged if they get reopened.
Target Milestone: Bugzilla 2.18 → ---
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: