summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2007-09-18 10:46:13 -0400
committerWill Woods <wwoods@redhat.com>2007-09-18 10:46:13 -0400
commitb56e6e6551c8a6cd2120c336de7b9eca50a191e1 (patch)
tree2f62869a587183c6b53ed35c66b231a8d0e16b14
parentb61a9e66d58bbb5fce3bb4493a4028df6fba9a18 (diff)
downloadpython-bugzilla-b56e6e6551c8a6cd2120c336de7b9eca50a191e1.tar.gz
python-bugzilla-b56e6e6551c8a6cd2120c336de7b9eca50a191e1.tar.xz
python-bugzilla-b56e6e6551c8a6cd2120c336de7b9eca50a191e1.zip
implement _setassignee
-rw-r--r--bugzilla.py10
1 files changed, 8 insertions, 2 deletions
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)