From 4d2f044142754e4c03c4fe9b4fd2ca9f93bb53b9 Mon Sep 17 00:00:00 2001 From: Gianluca Montecchi Date: Tue, 21 Jul 2009 00:51:37 +0200 Subject: implemented the detail file and fixed the list of active bug --- .../f776d667-6959-4cab-b05d-39e07702c04b/body | 1 + .../f776d667-6959-4cab-b05d-39e07702c04b/values | 8 +++ .../4ddf1313-bb3c-45d3-8dca-79ed5830d606/values | 5 +- becommands/html.py | 51 +++++++------ becommands/html_data.py | 84 +++++++++++++++++++--- 5 files changed, 118 insertions(+), 31 deletions(-) create mode 100644 .be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/comments/f776d667-6959-4cab-b05d-39e07702c04b/body create mode 100644 .be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/comments/f776d667-6959-4cab-b05d-39e07702c04b/values 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 index 0000000..184fdad --- /dev/null +++ b/.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/comments/f776d667-6959-4cab-b05d-39e07702c04b/body @@ -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 index 0000000..dd1fd4b --- /dev/null +++ b/.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/comments/f776d667-6959-4cab-b05d-39e07702c04b/values @@ -0,0 +1,8 @@ +Content-type: text/plain + + +Date: Mon, 20 Jul 2009 21:54:57 +0000 + + +From: Gianluca Montecchi + diff --git a/.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/values b/.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/values index 95b83ee..ba1e385 100644 --- a/.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/values +++ b/.be/bugs/4ddf1313-bb3c-45d3-8dca-79ed5830d606/values @@ -1,3 +1,6 @@ +assigned: Gianluca Montecchi + + creator: gianluca @@ -7,7 +10,7 @@ reporter: gianluca severity: minor -status: open +status: assigned summary: Bug di test diff --git a/becommands/html.py b/becommands/html.py index 224c876..ce9fb7b 100644 --- a/becommands/html.py +++ b/becommands/html.py @@ -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("") + FD.write(detail_last) FD.close() \ No newline at end of file diff --git a/becommands/html_data.py b/becommands/html_data.py index f9c966a..68445cd 100644 --- a/becommands/html_data.py +++ b/becommands/html_data.py @@ -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 =""" - - _bug_id_ - _status_ - _sev_ - _descr_ - _time_ + +%s +%s +%s +%s +%s """ + +detail_first = """ + + +BugsEverywhere Issue Tracker + + + + + + +
+

BugsEverywhere Bug List

+

Bug: _bug_id_

+ + +""" + + +detail_line =""" + + + +""" + index_last = """
%s%s
@@ -258,3 +313,16 @@ index_last = """ """ +detail_last = """ + + + +
+ +

Back to Index

+ + + + + +""" \ No newline at end of file -- cgit