From 1189aa1d879420e8e0cd6fd25e372eb60f8e5e59 Mon Sep 17 00:00:00 2001 From: Luke Macken Date: Wed, 2 Jan 2008 16:41:48 -0500 Subject: [PATCH] First attempt at a closebugs() implementation. diff --git a/bugzilla.py b/bugzilla.py index de0ba45..c3fa53b 100644 --- a/bugzilla.py +++ b/bugzilla.py @@ -373,11 +373,10 @@ class Bugzilla(object): returns: [$id, $mailresults]''' return self._proxy.bugzilla.changeAssignment(id,data,self.user,self.password) - def _closebug(self,id): - #closeBug($bugid, $new_resolution, $username, $password, $dupeid, $new_fixed_in, $comment, $isprivate) - # if new_resolution is 'DUPLICATE', dupeid is not optional - # new_fixed_id, comment, isprivate are optional - raise NotImplementedError + def _closebug(self,id,resolution,dupeid='',fixed_in='',comment='', + private=False): + return self._proxy.bugzilla.closeBug(id,resolution,self.user, + self.password,dupeid,fixed_in,comment,private) def _updatedeps(self,id,deplist): #updateDepends($bug_id,$data,$username,$password,$nodependencyemail) @@ -766,5 +765,9 @@ class Bug(object): tags = self.gettags(which) tags.remove(tag) self.setwhiteboard(' '.join(tags),which) + def closebug(self,resolution,dupeid='',fixed_in='',comment='',private=False): + self.bugzilla._closebug(self.bug_id,resolution,dupeid,fixed_in, + comment,private) + # TODO: add a sync() method that writes the changed data in the Bug object # back to Bugzilla. Someday. -- 1.5.3.6