GNOME Bugzilla – Bug 138144
Nice queries for maintainers
Last modified: 2005-08-15 01:38:56 UTC
The new bug query for patches will be something like this: Attachment is patch is 1 AND Attachment is obsolete not 1 AND Attachment status "needs-work" not 1 AND Attachment status "maintainer-ok" not 1 I think we need a page where maintainers can choose their module and run this query. We could add other useful queries at the same time - showstoppers, anyone?
Maintainer queries or something, yeah.
This should be doable as a simple page with some forms that call buglist.cgi, where most of the fields are passed in as <input type="hidden"> values. It would be nice if it also allowed a maintainer to save one of the queries to their "preset queries" bar in the page footer.
misirlou has been working on this a bit, cc'ing him. Current query is: http://bugzilla.gnome.org/buglist.cgi?short_desc_type=allwordssubstr&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&chfieldto=Now&field0-0-0=attachments.mimetype&type0-0-0=equals&value0-0-0=text%2Fplain&field0-1-0=attachments.thedata&type0-1-0=substring&value0-1-0=---&field0-2-0=attachments.ispatch&type0-2-0=equals&field0-3-0=attachments.isobsolete&type0-3-0=notequals&value0-3-0=1&order=bugs.bug_id but does not check for needs-work or *commit*.
Quick, crappy first go at this is at http://bugzilla.gnome.org/patch-status.cgi It's lacking, but it gives some rough clue about how far we have to go, per-module :/
OK. I think something is a little hosed (possibly with the customfields stuff again) but here goes. James, if you've got any clue on the new searching stuff and the interaction with fielddefs, I'd appreciate some of your wisdom- I've never tried to understand it until tonight and I feel like I must be missing something obvious. Thanks. The following query shows some bugs with patches in gnome-media: http://bugzilla.gnome.org/buglist.cgi?short_desc_type=allwordssubstr&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&chfieldto=Now&field0-0-0=attachments.mimetype&type0-0-0=equals&value0-0-0=text%2Fplain&field0-1-0=attachments.thedata&type0-1-0=substring&value0-1-0=---&field0-2-0=attachments.ispatch&type0-2-0=equals&field0-3-0=attachments.isobsolete&type0-3-0=notequals&value0-3-0=1&order=bugs.bug_id&product=gnome-media this next query intends to be the same, but excluding bugs that have the 'needswork' status set: http://bugzilla.gnome.org/buglist.cgi?short_desc_type=allwordssubstr&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&chfieldto=Now&field0-0-0=attachments.mimetype&type0-0-0=equals&value0-0-0=text%2Fplain&field0-1-0=attachments.thedata&type0-1-0=substring&value0-1-0=---&field0-2-0=attachments.ispatch&type0-2-0=equals&field0-3-0=attachments.isobsolete&type0-3-0=notequals&value0-3-0=1&order=bugs.bug_id&product=gnome-media&field0-4-0=attachstatusdefs.name&type0-4-0=notequal&value0-4-0=needswork it not only fails, but 500s- [from the server log] [Thu Apr 08 23:48:26 2004] [error] [client 66.31.47.201] [Thu Apr 8 23:48:26 2004] buglist.cgi: Use of uninitialized value in subroutine entry at buglist.cgi line 631. [Thu Apr 08 23:48:26 2004] [error] [client 66.31.47.201] Can't use string ("") as a subroutine ref while "strict refs" in use at [Thu Apr 08 23:48:26 2004] [error] [client 66.31.47.201] !buglist.cgi line 631 (#2) [Thu Apr 08 23:48:26 2004] [error] [client 66.31.47.201] (F) Only hard references are allowed by "strict refs". Symbolic[Thu Apr 08 23:48:26 2004] [error] [client 66.31.47.201] references are disallowed. See perlref. [Thu Apr 08 23:48:26 2004] [error] [client 66.31.47.201] [Thu Apr 08 23:48:26 2004] [error] [client 66.31.47.201] Uncaught exception from user code: [Thu Apr 08 23:48:26 2004] [error] [client 66.31.47.201] !Can't use string ("") as a subroutine ref while "strict refs" in use at buglist.cgi line 631. [Thu Apr 08 23:48:26 2004] [error] [client 66.31.47.201] !main::__ANON__ called at buglist.cgi line 1029 [Thu Apr 08 23:48:26 2004] [error] [client 66.31.47.201] !main::GenerateSQL('ARRAY(0x8268a40)','undef','undef','short_desc_type=allwordssubstr&bug_status=UNCONFIRMED&bug_sta...','ARRAY(0x8265d00)') called at buglist.cgi line 1366
What the patch query needs to do is basically (pseudo-SQL): select bugs.bug_id where ( patch exists[1] AND attachment_flag.obsolete = unset AND ( attachment_status.acceptednow = unset AND attachment_status.needswork = unset AND attachment_status.acceptedfreeze = unset ) ) [1] this can be either (poor heuristic): attachment flag.patch = set or (much better) attachment type=text/plain and body of attachment contains '---' or best either/or on those qualities.
Decent implementation of this using the patch flag commited to patch-status.cgi. There are still something like 70 open text/plain attachments that contain '---' that aren't marked as patches, though. Basic SQL for that is: select attachments.attach_id from attachments LEFT JOIN bugs on attachments.bug_id=bugs.bug_id where mimetype='text/plain' and ispatch=0 and thedata LIKE '%---%' and (bugs.bug_status='UNCONFIRMED' or bugs.bug_status='NEW' or bugs.bug_status='ASSIGNED' or bugs.bug_status='REOPENED'); I'm going to try to clean those up tonight. I think maybe after that we can nuke the PATCH keyword.
See also http://bugzilla.gnome.org/reports/patch-diligence-report.cgi (do a "View->Page Source" and you'll note that the script takes a lot of parameters too) and http://bugzilla.gnome.org/reports/patches-to-act-on.cgi (which takes an optional "use_blocked=1" parameter). It might be nice to add code from these to extend the query.cgi page in order to enable more flexible searches, but these seem to do most of what I think we need for now...
*** Bug 141236 has been marked as a duplicate of this bug. ***
In general... could we do a task-oriented query page, one that asked for product at the top, and then after that had sections like: Show me all unreviewed patches [Go] show me all unconfirmed bugs [Go] show me all bugs I haven't commented on [Go] show me all bugs with following content ______ [Go] (would search on subject and body) show me all bugs marked FIXED since _____ [Go] (for release notes, etc.) And so on...? Seems like for many hackers/maintainers/others a query page done this way would be very useful.
Using gtk+ for purposes of having a concrete example, using boogle: Show me all unreviewed patches [Go] product:gtk+ patch-status:none show me all unconfirmed bugs [Go] product:gtk+ status:unconfirmed show me all bugs I haven't commented on [Go] product:gtk+ comment-count:1 show me all bugs with following content ______ [Go] (would search on subject and body) procuct:gtk+ (summary:"content" OR comment:"content") show me all bugs marked FIXED since _____ [Go] (for release notes, etc.) I haven't added any support for bugs_activity to Boogle. The main sticking point is that the syntax would have to be significantly different than with anything else as more fields need to be specified. If someone can come up with something sane, I might add it. But currently, it looks like this kind of query could be one of those specially made ones for reports/reports.cgi.
Some generic queries are now at http://bugzilla.gnome.org/reports/reports.cgi#maintainers; if anyone wants others, feel free to open a new bug or ping me or something but I'm going to mark this as fixed for now :)