status-report-scripts pyGetReviewByFlags,1.10,1.11

Jason ãã£ãã (tibbs) fedora-extras-commits at redhat.com
Thu Jan 24 05:09:28 UTC 2008


Author: tibbs

Update of /cvs/fedora/status-report-scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21160

Modified Files:
	pyGetReviewByFlags 
Log Message:
Add -u parameter taking the bugzilla URL to connect to.
Colorize the ticket list for NEEDSPONSOR or GUIDELINES tickets.



Index: pyGetReviewByFlags
===================================================================
RCS file: /cvs/fedora/status-report-scripts/pyGetReviewByFlags,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- pyGetReviewByFlags	7 Dec 2007 06:35:30 -0000	1.10
+++ pyGetReviewByFlags	24 Jan 2008 05:09:25 -0000	1.11
@@ -20,7 +20,7 @@
 # This URL will work publically
 #url = 'https://bugzilla.redhat.com/xmlrpc.cgi'
 # This URL will work in the Phoenix colo
-url = 'https://bzprx.vip.phx.redhat.com/xmlrpc.cgi'
+#url = 'https://bzprx.vip.phx.redhat.com/xmlrpc.cgi'
 
 flagData = {
     # 'FLAG' : (baseFlagFilename, openMsg, closeMsg),
@@ -41,6 +41,10 @@
               help="destination directory")
     parser.add_option("-f", "--frequency", dest="frequency",
               help="update frequency", default="60")
+    parser.add_option("-u", "--url", dest="url",
+              help="bugzilla URL to query",
+              default="https://bzprx.vip.phx.redhat.com/xmlrpc.cgi")
+
     (options, args) = parser.parse_args()
     tst = str(options.dirname)
     if str(options.dirname) == 'None':
@@ -113,7 +117,8 @@
             notClosedCnt += 1
     print >> f, """
 <h1 style="background-color: #99f">%s<br/>
-There are %d tickets in this category</h1>
+There are %d tickets in this category<br/>
+Note: NEEDSPONSOR tickets are in green, tickets blocked on guidelines are in red.</h1>
 <table class="buglist" cellspacing="0" cellpadding="4" width="100%%">
 <colgroup>
 <col class="bz_id_column">
@@ -142,10 +147,16 @@
         if e['assigned_to'] == "Nobody's working on this, feel free to take it":
             e['assigned_to'] = "(Nobody)"
         cnt += 1
-        if (cnt % 2) == 1:
-            print >> f, '<tr class="bz_even bz_'
+        blockers = str(e['blockedby']).split(', ')
+        if '177841' in blockers:
+            trclass = 'bz_inprogress'
+        elif '197974' in blockers:
+            trclass = 'bz_onhold'
+        elif (cnt % 2) == 1:
+            trclass = 'bz_even'
         else:
-            print >> f, '<tr class="bz_odd bz_'
+            trclass = 'bz_odd'
+        print >> f, '<tr class="', trclass, 'bz_'
         print >> f, e['bug_status'], ' onMouseOver="bug_over(this, 0);">', "\n"
         print >> f, """
 <td>
@@ -222,8 +233,8 @@
 
 
 if __name__ == '__main__':
-    server = xmlrpclib.Server(url)
     options = parse_commandline()
+    server = xmlrpclib.Server(options.url)
     tmpdir = tempfile.mkdtemp(dir=options.dirname)
     fname = os.path.join(tmpdir, "NEW.html")
     try:




More information about the fedora-extras-commits mailing list