status-report-scripts review-stats.py,1.2,1.3

Jason ティビツ tibbs at fedoraproject.org
Thu Oct 15 18:48:26 UTC 2009


Author: tibbs

Update of /cvs/fedora/status-report-scripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11899

Modified Files:
	review-stats.py 
Log Message:
Add per-month counts in main new ticket view.
Fix colspan use in the month headings.



Index: review-stats.py
===================================================================
RCS file: /cvs/fedora/status-report-scripts/review-stats.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- review-stats.py	3 Oct 2009 17:46:34 -0000	1.2
+++ review-stats.py	15 Oct 2009 18:47:56 -0000	1.3
@@ -2,10 +2,12 @@
 VERSION = "2.0"
 
 # $Id$
-#
 # Note: This script presently lives in internal git and external cvs.  External
-# cvs is::
+# cvs is:
+# http://cvs.fedoraproject.org/viewvc/status-report-scripts/review-stats.py?root=fedora
+# or check it out with
 # CVSROOT=:pserver:anonymous at cvs.fedoraproject.org:/cvs/fedora cvs co status-report-scripts
+#
 # Internal is in the puppet configs repository on puppet1.  It needs to be
 # there so that puppet can distribute to the servers.  I recommend doing the
 # work in the public cvs first, then copying to puppet's git after.
@@ -261,6 +263,7 @@
             }
     count = 0
     curmonth = ''
+    curcount = 0
 
     for i in bugs:
         if (bugdata[i.bug_id]['reviewflag'] == ' '
@@ -273,6 +276,7 @@
             if curmonth != yrmonth(i.opendate):
                 data['months'].append({'month': yrmonth(i.opendate), 'bugs': []})
                 curmonth = yrmonth(i.opendate)
+                curcount = 0
 
             data['months'][-1]['bugs'].append({'id': i.bug_id,
                     'alias': to_unicode(i.alias),
@@ -283,6 +287,8 @@
                     'summary': to_unicode(i.short_desc),
                     })
             data['count'] +=1
+            curcount +=1
+
 
     tmpl = loader.load('bymonth.html')
     output = tmpl.generate(**data)
@@ -308,6 +314,7 @@
             'version': VERSION,
             }
     curmonth = ''
+    curcount = 0
 
     for i in bugs:
         if (bugdata[i.bug_id]['reviewflag'] == ' '
@@ -323,8 +330,11 @@
                 rowclass = 'bz_row_odd'
 
             if curmonth != yrmonth(i.opendate):
+                if curcount > 0:
+                    data['months'][-1]['month'] += (" (%d)" % curcount)
                 data['months'].append({'month': yrmonth(i.opendate), 'bugs': []})
                 curmonth = yrmonth(i.opendate)
+                curcount = 0
 
             data['months'][-1]['bugs'].append({'id': i.bug_id,
                     'alias': to_unicode(i.alias),
@@ -335,7 +345,9 @@
                     'summary': to_unicode(i.short_desc),
                     })
             data['count'] +=1
+            curcount +=1
 
+    data['months'][-1]['month'] += (" (%d)" % curcount)
     tmpl = loader.load('bymonth.html')
     output = tmpl.generate(**data)
 




More information about the fedora-extras-commits mailing list