Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/79946


Change subject: Add comments as invidual comments in bugzilla
......................................................................

Add comments as invidual comments in bugzilla

Change-Id: I102874266c3061ed53322002631972dd259c1c67
---
M bz.py
M sf.py
2 files changed, 9 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/sf-export 
refs/changes/46/79946/1

diff --git a/bz.py b/bz.py
index 31efcba..7a82b32 100644
--- a/bz.py
+++ b/bz.py
@@ -24,6 +24,12 @@
         'status': '',  # Need to map this
     }
     bug = BZ.createbug(**params)
+
+    # Now add all the comments.
+    for cmt in ticket.comments():
+        upd = BZ.build_update(comment=cmt)
+        BZ.update_bugs(bug.id, upd)
+
     return bug  # Bug object
 
 
diff --git a/sf.py b/sf.py
index fb4ac5f..d381719 100644
--- a/sf.py
+++ b/sf.py
@@ -114,7 +114,6 @@
             s.seek(0)  # reset
             yield url, s
 
-
     def export(self):
         # TODO: Is this good?
         t = ''
@@ -122,9 +121,9 @@
         t += 'Created on: 
{0}\n'.format(parse_ts(self.json['ticket']['created_date']))
         t += 'Subject: {0}\n'.format(self.summary())
         t += 'Original description:\n{0}\n'.format(self.description())
-        for cmt in self.comments():
-            t += '---------\n'
-            t += cmt + '\n'
+        #for cmt in self.comments():
+        #    t += '---------\n'
+        #    t += cmt + '\n'
         return t
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/79946
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I102874266c3061ed53322002631972dd259c1c67
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/sf-export
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to