web/hosts/issues graph.py,1.6,1.7

Nick Lewycky <[email protected]>
Newsgroups gmane.comp.video.fresco.cvs
Message-ID <[email protected]>
Update of /cvs/fresco/web/hosts/issues
In directory purcel:/tmp/cvs-serv744

Modified Files:
	graph.py 
Log Message:
Maybe produce graphs starting at milestones now.


Index: graph.py
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/graph.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- graph.py	25 Jan 2003 04:17:33 -0000	1.6
+++ graph.py	28 Jan 2003 01:49:59 -0000	1.7
@@ -115,8 +115,20 @@
     if not type+id in list:
         list[len(list)+1:len(list)+1] = [type+id]
         items = get_items(db, type)
-        write_node(file, type, id, items.get(id, 'title'), items.get(id, 'status'), items.get(id, 'priority'), first)
+
+        if type == 'milestone':
+            write_node(file, type, id, items.get(id, 'title'), items.get(id, 'status'), 4, first)
+        else:
+            write_node(file, type, id, items.get(id, 'title'), items.get(id, 'status'), items.get(id, 'priority'), first)
         
+        if type == 'milestone':
+            for bug in items.get(id, 'bugs'):
+                write_depend(file, type, id, 'bug', bug)
+                visit('bug', bug, 0)
+            for task in items.get(id, 'tasks'):
+                write_depend(file, type, id, 'task', task)
+                visit('task', task, 0)
+
         if type == 'task':
             items = get_items(db, 'task')
             for solve in items.get(id, 'solves'):
@@ -124,13 +136,14 @@
                 visit('bug', solve, 0)
             items = get_items(db, type)
 
-        for supersede in items.get(id, 'superseder'):
-            write_supersede(file, type, id, type, supersede)
-            visit(type, supersede, 0)
+        if type in ['task', 'bug']:
+            for supersede in items.get(id, 'superseder'):
+                write_supersede(file, type, id, type, supersede)
+                visit(type, supersede, 0)
                     
-        for depend in items.get(id, 'dependson'):
-            write_depend(file, type, id, type, depend)
-            visit(type, depend, 0)
+            for depend in items.get(id, 'dependson'):
+                write_depend(file, type, id, type, depend)
+                visit(type, depend, 0)
 
 if not output in ['png', 'svg', 'gif', 'cmap', 'mif', 'ps', 'ps2']:
     print 'Content-type: text/html\n'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.