changeset 23:2eaf17cb07f6

add whiteboard to new entry
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 17 Dec 2010 17:08:15 -0800
parents 3b7f4104cd72
children 61969be88632
files bzconsole/api.py setup.py
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bzconsole/api.py	Thu Dec 09 15:33:27 2010 -0800
+++ b/bzconsole/api.py	Fri Dec 17 17:08:15 2010 -0800
@@ -69,7 +69,7 @@
         return retval, dupe
 
     def new(self, component, title, product=None,
-            version=None, description=None):
+            version=None, description=None, whiteboard=None):
         """file a new bug. username and password must be set"""
 
         # sanity check
@@ -99,6 +99,13 @@
                        comments=[self._comment(description)],
                        op_sys='All', platform='All',)
 
+        # add whiteboard, if given
+        if whiteboard:
+            if isinstance(whiteboard, basestring):
+                whiteboard=[whiteboard]
+            whiteboard = ''.join(['[%s]' % i for i in whiteboard])
+            request['whiteboard'] = whiteboard
+
         # POST the request
         try:
             results = self._request('/bug', request)
--- a/setup.py	Thu Dec 09 15:33:27 2010 -0800
+++ b/setup.py	Fri Dec 17 17:08:15 2010 -0800
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 import sys, os
 
-version = '0.1'
+version = '0.1.1'
 
 readme = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'README.txt')