[python-bugzilla] [PATCH] Expose bug history

Richard Marko rmarko at redhat.com
Mon Feb 11 18:45:28 UTC 2013


Signed-off-by: Richard Marko <rmarko at redhat.com>
---
 bugzilla/base.py |  6 ++++++
 bugzilla/bug.py  | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/bugzilla/base.py b/bugzilla/base.py
index 57f5872..d43ce60 100644
--- a/bugzilla/base.py
+++ b/bugzilla/base.py
@@ -744,6 +744,12 @@ class BugzillaBase(object):
         '''
         pass
 
+    def bugs_history(self, bug_ids):
+        '''
+        Experimental. Gets the history of changes for
+        particular bugs in the database.
+        '''
+        return self._proxy.Bug.history({'ids': bug_ids})
 
     #######################################
     # Methods for modifying existing bugs #
diff --git a/bugzilla/bug.py b/bugzilla/bug.py
index 8c91b9b..feef51c 100644
--- a/bugzilla/bug.py
+++ b/bugzilla/bug.py
@@ -407,6 +407,16 @@ class _Bug(object):
         return f[0]['status']
 
 
+    ########################
+    # Experimental methods #
+    ########################
+
+    def get_history(self):
+        '''
+        Experimental. Get the history of changes for this bug.
+        '''
+        return self.bugzilla.bugs_history([self.bug_id])
+
     ######################
     # Deprecated methods #
     ######################
-- 
1.8.1



More information about the python-bugzilla mailing list