aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/html.py
diff options
context:
space:
mode:
authorGianluca Montecchi <gian@grys.it>2009-07-21 23:51:33 +0200
committerGianluca Montecchi <gian@grys.it>2009-07-21 23:51:33 +0200
commit694e2bfbdf64e2c50efae81aa848777b65e6dc0a (patch)
treecbece6d0dd19dfd99cfde628c2080dd2d6d606c2 /becommands/html.py
parent4d2f044142754e4c03c4fe9b4fd2ca9f93bb53b9 (diff)
downloadbugseverywhere-694e2bfbdf64e2c50efae81aa848777b65e6dc0a.tar.gz
Initial implementation of the comments export
Diffstat (limited to 'becommands/html.py')
-rw-r--r--becommands/html.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/becommands/html.py b/becommands/html.py
index ce9fb7b..b0441b9 100644
--- a/becommands/html.py
+++ b/becommands/html.py
@@ -66,7 +66,7 @@ def execute(args, test=False):
ordered_bug_list = sorted([(value,key) for (key,value) in stime.items()])
#open_bug_list = sorted([(value,key) for (key,value) in bugs.items()])
- html_gen = BEHTMLGen()
+ html_gen = BEHTMLGen(bd)
html_gen.create_index_file(out_dir, st, bugs, ordered_bug_list)
def get_parser():
@@ -82,8 +82,9 @@ def help():
class BEHTMLGen():
- def __init__(self):
- self.index_value = ""
+ def __init__(self, bd):
+ self.index_value = ""
+ self.bd = bd
def create_index_file(self, out_dir_path, summary, bugs, ordered_bug):
try:
@@ -121,7 +122,6 @@ class BEHTMLGen():
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)
@@ -138,10 +138,14 @@ class BEHTMLGen():
detail_first_ = re.sub('_bug_id_', bug.uuid[0:3], detail_first)
FD.write(detail_first_)
- bug.load_comments()
- c = bug.comment_root
- print c.body
+
+
+ bug_ = self.bd.bug_from_shortname(bug.uuid[0:3])
+ bug_.load_comments(load_full=True)
+ for i in bug_.comments():
+ print i.uuid, i.in_reply_to
+
FD.write(detail_line%("ID : ", bug.uuid))
FD.write(detail_line%("Short name : ", bug.uuid[0:3]))
FD.write(detail_line%("Severity : ", bug.severity))