The following commit has been merged in the master branch:
commit 5c5c2c457bc9587a3cf07190cf316f3eb29745aa
Author: Andreas Tille <[email protected]>
Date: Sat Jul 20 23:46:40 2013 +0200
Add weighttask
diff --git a/webtools/bugs_udd.py b/webtools/bugs_udd.py
index d417f4f..d83a8c0 100755
--- a/webtools/bugs_udd.py
+++ b/webtools/bugs_udd.py
@@ -146,6 +146,7 @@ def main():
bugs_data[task[0]] = {}
bugs_data[task[0]]['nopenbugs'] = 0
bugs_data[task[0]]['ndonebugs'] = 0
+ bugs_data[task[0]]['weighttask'] = 0
for status in STATES:
bugs_data[task[0]][status + '_l'] = [] # enable sorting
bugs_data[task[0]][status] = {}
@@ -203,11 +204,13 @@ def main():
bugs_data[task][pkg['status']+'_l'].append(pkg['source'])
for s in SEVERITIES:
bugs_data[task][pkg['status']]['severities'][s] +=
bugs[pkg['source']]['severities'][s]
+ bugs_data[task]['weighttask'] += 3 * WEIGHT[s] *
bugs[pkg['source']]['severities'][s]
elif pkg['status'] == 'suggests':
bugs_data[task][pkg['status']][pkg['source']]['bugs'] =
bugs[pkg['source']]['open']
bugs_data[task][pkg['status']+'_l'].append(pkg['source'])
for s in SEVERITIES:
bugs_data[task][pkg['status']]['severities'][s] +=
bugs[pkg['source']]['severities'][s]
+ bugs_data[task]['weighttask'] += 1 * WEIGHT[s] *
bugs[pkg['source']]['severities'][s]
else:
print >>stderr, "%s: Wrong status %s in task %s for source
%s" % (blendname, pkg['status'], task, pkg['source'])
exit(1)
diff --git a/webtools/templates/bugs_udd.xhtml
b/webtools/templates/bugs_udd.xhtml
index 4af4720..f044c92 100644
--- a/webtools/templates/bugs_udd.xhtml
+++ b/webtools/templates/bugs_udd.xhtml
@@ -51,7 +51,7 @@
<py:for each="t in bugs_data.keys()">
<div py:choose="t">
<span py:when="task"
- class="curlink"><a
href="${t}.html">${t.capitalize()}</a> ${bugs_data[t]['nopenbugs']}
(${weighttask[t]})</span>
+ class="curlink"><a
href="${t}.html">${t.capitalize()}</a> ${bugs_data[t]['nopenbugs']}
(${bugs_data[t]['weighttask']})</span>
<span py:otherwise="" class="link
${weightedclass[t]}"><a
href="${t}.html">${tasks[t].metapkg.PrintedName.capitalize()}</a> ${nbugs[t]}
(${weighttask[t]})</span>
</div>
</py:for>
--
Static and dynamic websites for Debian Pure Blends
_______________________________________________
Blends-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit