implemented the detail file and fixed the list of active bug
authorGianluca Montecchi <gian@grys.it>
Mon, 20 Jul 2009 22:51:37 +0000 (00:51 +0200)
committerGianluca Montecchi <gian@grys.it>
Mon, 20 Jul 2009 22:51:37 +0000 (00:51 +0200)
.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/comments/f776d667-6959-4cab-b05d-39e07702c04b/body [new file with mode: 0644]
.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/comments/f776d667-6959-4cab-b05d-39e07702c04b/values [new file with mode: 0644]
.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/values
becommands/html.py
becommands/html_data.py

diff --git a/.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/comments/f776d667-6959-4cab-b05d-39e07702c04b/body b/.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/comments/f776d667-6959-4cab-b05d-39e07702c04b/body
new file mode 100644 (file)
index 0000000..184fdad
--- /dev/null
@@ -0,0 +1 @@
+Commento di test
diff --git a/.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/comments/f776d667-6959-4cab-b05d-39e07702c04b/values b/.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/comments/f776d667-6959-4cab-b05d-39e07702c04b/values
new file mode 100644 (file)
index 0000000..dd1fd4b
--- /dev/null
@@ -0,0 +1,8 @@
+Content-type: text/plain
+
+
+Date: Mon, 20 Jul 2009 21:54:57 +0000
+
+
+From: Gianluca Montecchi <gian@grys.it>
+
index 95b83ee1d9335e5134376b8c7535f0cb46b31e84..ba1e3858a2bc3bc63552e1c8ae1f6b3e60b0e532 100644 (file)
@@ -1,3 +1,6 @@
+assigned: Gianluca Montecchi <gian@grys.it>
+
+
 creator: gianluca <gian@galactica>
 
 
@@ -7,7 +10,7 @@ reporter: gianluca <gian@galactica>
 severity: minor
 
 
-status: open
+status: assigned
 
 
 summary: Bug di test
index 224c876e7aa2c752c7835a40b2c937fbd161cf47..ce9fb7bb20368da99b825c90af07919ce085f1c7 100644 (file)
@@ -60,7 +60,7 @@ def execute(args, test=False):
         st[s] = 0
     for b in bd:
         stime[b.uuid]  = b.time
-        if b.status == "open":
+        if b.status in ["open", "test", "unconfirmed", "assigned"]:
             bugs.append(b)
         st[b.status] += 1
     ordered_bug_list = sorted([(value,key) for (key,value) in stime.items()])
@@ -113,24 +113,16 @@ class BEHTMLGen():
         FO.write(index_first)
         c = 0
         t = len(bugs) - 1
-        for l in range(t,  0,  -1):
-            line = bug_line
-            line1 = re.sub('_bug_id_link_', bugs[l].uuid, line)
-            line = line1
-            line1 = re.sub('_bug_id_', bugs[l].uuid[0:3], line)
-            line = line1
-            line1 = re.sub('_status_', bugs[l].status, line)
-            line = line1
-            line1 = re.sub('_sev_', bugs[l].severity, line)
-            line = line1
-            line1 = re.sub('_descr_', bugs[l].summary, line)
-            line = line1
-            line2 = re.sub('_time_',  time.ctime(bugs[l].time),  line1)
-            if c%2 == 0:
-                linef = re.sub('_ROW_',  "even-row",  line2)
-            else:
-                linef = re.sub('_ROW_',  "odd-row",  line2)
-            FO.write(linef)
+        for l in range(t,  -1,  -1):
+            line = bug_line%(bugs[l].status,
+            bugs[l].uuid, bugs[l].uuid[0:3],
+            bugs[l].uuid,  bugs[l].status,
+            bugs[l].uuid,  bugs[l].severity,
+            bugs[l].uuid,  bugs[l].summary,
+            bugs[l].uuid,  bugs[l].time_string
+            )
+            print line
+            FO.write(line)
             c += 1
             self.CreateDetailFile(bugs[l], out_dir_path)
         FO.write(index_last)
@@ -143,8 +135,23 @@ class BEHTMLGen():
             FD = open(p, "w")
         except:
             raise  cmdutil.UsageError, "Cannot create the detail html file."
+
+        detail_first_ = re.sub('_bug_id_', bug.uuid[0:3], detail_first)
+        FD.write(detail_first_)
+        bug.load_comments()
         
-        FD.write(index_first)
-        
-        FD.write(index_last)
+        c = bug.comment_root
+        print c.body
+        FD.write(detail_line%("ID : ", bug.uuid))
+        FD.write(detail_line%("Short name : ", bug.uuid[0:3]))
+        FD.write(detail_line%("Severity : ", bug.severity))
+        FD.write(detail_line%("Status : ", bug.status))
+        FD.write(detail_line%("Assigned : ", bug.assigned))
+        FD.write(detail_line%("Target : ", bug.target))
+        FD.write(detail_line%("Reporter : ", bug.reporter))
+        FD.write(detail_line%("Creator : ", bug.creator))
+        FD.write(detail_line%("Created : ", bug.time_string))
+        FD.write(detail_line%("Summary : ", bug.summary))
+        FD.write("<tr></tr>")
+        FD.write(detail_last)
         FD.close()
\ No newline at end of file
index f9c966a1ec428500de7fa57140edd4b5f2f24b33..68445cd0ddffe96a29b42e5e0fd1d08996ed0e1c 100644 (file)
@@ -18,17 +18,47 @@ margin-top: 1em;
 background-color: #fcfcfc;
 }
 
-.even-row {
+tb {
+border = 1;
+}
+
+.open-row {
 background-color: #e9e9e2;
 width: 5%;
 }
 
-.odd-row {
+.assigned-row {
+background-color: #f9f9f9;
+width: 5%;
+}
+
 
+.test-row {
 background-color: #f9f9f9;
 width: 5%;
 }
 
+.unconfirmed-row {
+background-color: #f9f9f9;
+width: 5%;
+}
+
+.fixed-row {
+background-color: #f9f9f9;
+width: 5%;
+}
+
+.closed-row {
+background-color: #f9f9f9;
+width: 5%;
+}
+
+.wontfix-row {
+background-color: #f9f9f9;
+width: 5%;
+}
+
+
 .person {
 font-family: courier;
 }
@@ -235,15 +265,40 @@ index_first = """
 """    
 
 bug_line ="""
-<tr class=_ROW_>
-    <td><a href="bugs/_bug_id_link_.html">_bug_id_</a></td>
-    <td><a href="bugs/_bug_id_link_.html">_status_</a></td>
-    <td><a href="bugs/_bug_id_link_.html">_sev_</a></td>
-    <td><a href="bugs/_bug_id_link_.html">_descr_</a></td>
-    <td><a href="bugs/_bug_id_link_.html">_time_</a></td>
+<tr class=%s-row cellspacing=1>
+<td ><a href="bugs/%s.html">%s</a></td>
+<td ><a href="bugs/%s.html">%s</a></td>
+<td><a href="bugs/%s.html">%s</a></td>
+<td><a href="bugs/%s.html">%s</a></td>
+<td><a href="bugs/%s.html">%s</a></td>
 </tr>
 """
+
+detail_first = """
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<title>BugsEverywhere Issue Tracker</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" href="../style.css" type="text/css" />
+</head>
+<body>
+
+
+<div class="main">
+<h1>BugsEverywhere Bug List</h1>
+<h2>Bug: _bug_id_</h2>
+<table >
+<tbody>
+"""   
+
+        
         
+detail_line ="""
+<tr>
+    <td align="right">%s</td><td>%s</td>
+</tr>
+"""
+
 index_last = """
 </tbody>
 </table>
@@ -258,3 +313,16 @@ index_last = """
 </html>
 """
 
+detail_last = """
+</tbody>
+</table>
+
+</div>
+
+<h2><a href="../index.html">Back to Index</a></h2>
+
+<div class="footer">Generated by <a href="http://www.bugseverywhere.org/">BugsEverywhere</a>.</div>
+
+</body>
+</html>
+"""
\ No newline at end of file