[python-bugzilla] [PATCH] Add groups functionality when creating bugs
Paul W. Frields
pfrields at redhat.com
Thu May 16 13:47:44 UTC 2013
Since BZ 4.0 there is an XMLRPC/Web service capability to define
groups when creating a bug. There are additional capabilities to add
or remove groups, but to keep this simple for now, I just stuck with
the create time function.
I verified that *not* setting a group seems to do nothing different
than in the current released version (0.8.0) of the client. Patch
attached against git master.
--
Paul
-------------- next part --------------
diff --git a/bin/bugzilla b/bin/bugzilla
index 9dc0091..5f48b78 100755
--- a/bin/bugzilla
+++ b/bin/bugzilla
@@ -140,6 +140,8 @@ def setup_action_parser(action):
help="OPTIONAL: add bug_ids blocked by this bug")
p.add_option('--dependson', metavar='BUGID[, BUGID, ...]',
help="OPTIONAL: add bug_ids that this bug depends on")
+ p.add_option('--groups', metavar='GROUP[, GROUP, ...]',
+ help="OPTIONAL: add groups to which bug is visible")
# no API to attach files during bug creation, so no --attach :/
elif action == 'query':
@@ -696,10 +698,10 @@ def _do_new(bz, opt):
data = {}
allopts = ["product", "version", "component", "description",
"summary", "op_sys", "platform", "severity", "priority",
- "bug_file_loc", "cc", "blocked", "dependson"]
+ "bug_file_loc", "cc", "blocked", "dependson", "groups"]
# Handle options that take a list format
- multiopts = ['cc', 'blocked', 'dependson']
+ multiopts = ['cc', 'blocked', 'dependson', 'groups']
for key in allopts:
if not hasattr(opt, key) or getattr(opt, key) is None:
More information about the python-bugzilla
mailing list