--- Begin Message ---
Package: qa.debian.org
Severity: normal
User: qa.debian.org@packages.debian.org
Usertags: udd
Tags: patch
Hi,
In bugs.cgi the unblock requests are shown based on bugs against
release.debian.org that match '^unblock (package)'. A number of unblock
requests have a (slightly) different title. They all (should) have an unblock
usertag, so the unblock requests can be found based on that usertag. That way,
more unblock can be found and displayed.
The attached patch implements this.
Cheers,
Ivo
commit 7c665b035744b477eda95f4ac7d9fa9d45cc428d
Author: Ivo De Decker <ivo.dedecker@ugent.be>
Date: Mon Dec 10 00:02:01 2012 +0100
get unblock request via usertags
diff --git a/web/bugs.cgi b/web/bugs.cgi
index 49d211e..211f78d 100755
--- a/web/bugs.cgi
+++ b/web/bugs.cgi
@@ -357,13 +357,16 @@ if cols['chints']
hints[r['source']] ||= []
hints[r['source']] << r
end
- sthh = dbh.prepare("select id, title from bugs where source='release.debian.org' and status='pending' and title ~ '^unblock'")
+ sthh = dbh.prepare("select distinct bugs_usertags.id as id, bugs_usertags.tag as tag, bugs.title as title from bugs_usertags, bugs where bugs.id = bugs_usertags.id and bugs_usertags.email='release.debian.org@packages.debian.org' and bugs_usertags.tag='unblock' and bugs.status = 'pending'")
sthh.execute
rowsh = sthh.fetch_all
unblockreq = {}
ids = []
rowsh.each do |r|
- src = r['title'].split(" ")[1].split('/')[0]
+ src = (/[^-a-zA-Z0-9.]([-a-zA-Z0-9.]+)\//.match(r['title']) || [] ) [1] || "";
+ if src == ""
+ src = r['title'].split(" ")[1].split('/')[0]
+ end
unblockreq[src] ||= []
unblockreq[src] << r['id']
ids << r['id']
--- End Message ---
--- Begin Message ---
On 10/12/12 at 00:28 +0100, Ivo De Decker wrote:
> Package: qa.debian.org
> Severity: normal
> User: qa.debian.org@packages.debian.org
> Usertags: udd
> Tags: patch
>
> Hi,
>
> In bugs.cgi the unblock requests are shown based on bugs against
> release.debian.org that match '^unblock (package)'. A number of unblock
> requests have a (slightly) different title. They all (should) have an unblock
> usertag, so the unblock requests can be found based on that usertag. That way,
> more unblock can be found and displayed.
>
> The attached patch implements this.
Thanks, applied
Lucas
--- End Message ---