[Blends-commit] [SCM] website branch, master, updated. 5cdd74855fd0fd9aeee6d283ef34e1b05beafe47

Andreas Tille tille at debian.org
Fri Jul 26 13:23:38 UTC 2013


The following commit has been merged in the master branch:
commit 6f530ee7be4b61c41dce49d866774a697d2b727c
Author: Andreas Tille <tille at debian.org>
Date:   Fri Jul 26 15:23:38 2013 +0200

    Make sure all tasks are featuring a set of severities ... even if no bugs might occure

diff --git a/webtools/bugs_udd.py b/webtools/bugs_udd.py
index 49ea231..0ada84d 100755
--- a/webtools/bugs_udd.py
+++ b/webtools/bugs_udd.py
@@ -148,8 +148,10 @@ def main():
             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]         = {}
+                bugs_data[task[0]][status + '_l']  = [] # enable sorting
+                bugs_data[task[0]][status]         = {}
+                if status != 'done':
+                    bugs_data[task[0]][status]['severities'] = {}
     else:
         print >>stderr, "No tasks metadata received for Blend", blendname
         exit(1)
@@ -189,8 +191,6 @@ def main():
     if curs.rowcount > 0:
         for pkg in RowDictionaries(curs):
             for task in pkg['tasks']:
-                bugs_data[task]['depends']['severities'] = {}
-                bugs_data[task]['suggests']['severities'] = {}
                 for s in SEVERITIES:
                     bugs_data[task]['depends']['severities'][s] = 0
                     bugs_data[task]['suggests']['severities'][s] = 0
@@ -437,6 +437,7 @@ the right shows the tasks of %s.""" ) \
     data['nbugs']           = nbugs
     data['ndone']           = ndone
     data['weight']          = WEIGHT
+    data['severities']      = SEVERITIES
     data['nohomepage']      = _('Homepage not available')
     data['novcsbrowser']    = _('Not maintained in Vcs')
     data['vcslocation']     = _('Vcs')
@@ -447,7 +448,6 @@ the right shows the tasks of %s.""" ) \
     for key in ('css', 'homepage', 'projecturl', 'projectname', 'logourl', 'ubuntuhome', 'projectubuntu'):
         data[key] = config[key]
     
-    print "DEBUG:", nbugs
     for task in bugs_data:
     	data['task']            = task
     	#data['buglist']         = buglist[task]
diff --git a/webtools/templates/bugs_udd.xhtml b/webtools/templates/bugs_udd.xhtml
index 2a14f5e..0985553 100644
--- a/webtools/templates/bugs_udd.xhtml
+++ b/webtools/templates/bugs_udd.xhtml
@@ -67,8 +67,8 @@
                       <py:for each="s in severities">
                         <tr>
 			  <td class="severity ${s}">${s}</td>
-			  <td class="bugid ${s}">${severitystat[DEPENDENT][s]}</td>
-			  <td class="bugid ${s}">${severitystat[SUGGESTED][s]}</td>
+			  <td class="bugid ${s}">${bugs_data[task]['depends']['severities'][s]}</td>
+			  <td class="bugid ${s}">${bugs_data[task]['suggests']['severities'][s]}</td>
 			</tr>
                       </py:for>
 		    </table>

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list