From b56e6e6551c8a6cd2120c336de7b9eca50a191e1 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Tue, 18 Sep 2007 10:46:13 -0400 Subject: implement _setassignee --- bugzilla.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bugzilla.py') diff --git a/bugzilla.py b/bugzilla.py index 9b9ff36..f7dc958 100644 --- a/bugzilla.py +++ b/bugzilla.py @@ -355,11 +355,17 @@ class Bugzilla(object): # new_fixed_id, comment, isprivate are optional raise NotImplementedError - def _setassignee(self,id,assignee): + def _setassignee(self,id,assigned_to='',reporter='',qa_contact='',comment=''): #changeAssignment($id, $data, $username, $password) #data: 'assigned_to','reporter','qa_contact','comment' #returns: [$id, $mailresults] - raise NotImplementedError + if not assigned_to or reporter or qa_contact: + # XXX is ValueError the right thing to throw here? + raise ValueError, "You must set one of assigned_to, reporter, or qa_contact" + # empty fields are ignored, so it's OK to send 'em + data = {'assigned_to': assigned_to, 'reporter': reporter, + 'qa_contact': qa_contact, 'comment': comment} + return self._proxy.bugzilla.changeAssignment(id,data,self.user,self.password) def _updatedeps(self,id,deplist): #updateDepends($bug_id,$data,$username,$password,$nodependencyemail) -- cgit