Signed-off-by: Lon Hohberger lhh@redhat.com --- bin/bugzilla | 10 ++++++++++ bugzilla/base.py | 7 ++++++- bugzilla/rhbugzilla.py | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/bin/bugzilla b/bin/bugzilla index 30a1b13..0ded73e 100755 --- a/bin/bugzilla +++ b/bin/bugzilla @@ -154,6 +154,13 @@ def setup_action_parser(action): p.add_option('--groups', metavar='GROUP[, GROUP, ...]', action="append", help="add groups to which bug is visible") + p.add_option('--assigned_to', + help='Assign bugzilla to specified email address') + p.add_option('--qa_contact', + help='Set QA contact to specified email address') + p.add_option('--keywords', + metavar='KEYWORD[, KEYWORD, ...]', action="append", + help="Set specified keywords on new bugzilla")
elif action == 'query': p.set_description("List bug reports that match the given criteria.") @@ -836,6 +843,7 @@ def _do_new(bz, opt): depends_on=parse_multi(opt.dependson) or None, description=opt.description or None, groups=parse_multi(opt.groups) or None, + keywords=parse_multi(opt.keywords) or None, op_sys=opt.os or None, platform=opt.arch or None, priority=opt.priority or None, @@ -844,6 +852,8 @@ def _do_new(bz, opt): summary=opt.summary or None, url=opt.url or None, version=opt.version or None, + assigned_to=opt.assigned_to or None, + qa_contact=opt.qa_contact or None, )
if opt.test_return_result: diff --git a/bugzilla/base.py b/bugzilla/base.py index 3a5d65d..b1258e7 100644 --- a/bugzilla/base.py +++ b/bugzilla/base.py @@ -1304,6 +1304,8 @@ class BugzillaBase(object): comment_private=None, blocks=None, cc=None, + assigned_to=None, + keywords=None, depends_on=None, groups=None, op_sys=None, @@ -1326,6 +1328,8 @@ class BugzillaBase(object): localdict["depends_on"] = self._listify(depends_on) if groups: localdict["groups"] = self._listify(groups) + if keywords: + localdict["keywords"] = self._listify(keywords) if description: localdict["description"] = description if comment_private: @@ -1338,7 +1342,8 @@ class BugzillaBase(object): platform=platform, priority=priority, qa_contact=qa_contact, resolution=resolution, severity=severity, status=status, target_milestone=target_milestone, - target_release=target_release, url=url) + target_release=target_release, url=url, + assigned_to=assigned_to)
ret.update(localdict) return ret diff --git a/bugzilla/rhbugzilla.py b/bugzilla/rhbugzilla.py index 6eda791..399ecb0 100644 --- a/bugzilla/rhbugzilla.py +++ b/bugzilla/rhbugzilla.py @@ -54,7 +54,7 @@ class RHBugzilla(_parent): getbug_extra_fields = ( _parent.getbug_extra_fields + [ "attachments", "comments", "description", - "external_bugs", "flags", + "external_bugs", "flags" ] )
Signed-off-by: Lon Hohberger lhh@redhat.com --- tests/createbug.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/createbug.py b/tests/createbug.py index 740a25f..dab2205 100644 --- a/tests/createbug.py +++ b/tests/createbug.py @@ -62,13 +62,16 @@ class CreatebugTest(unittest.TestCase): def testMultiOpts(self): # Test all opts that can take lists out = {'blocks': ['3', '4'], 'cc': ['1', '2'], - 'depends_on': ['5', 'foo', 'wib'], 'groups': ['bar', '8']} + 'depends_on': ['5', 'foo', 'wib'], 'groups': ['bar', '8'], + 'keywords': ['TestOnly', 'ZStream']} self.clicomm( - "--cc 1,2 --blocked 3,4 --dependson 5,foo,wib --groups bar,8", + "--cc 1,2 --blocked 3,4 --dependson 5,foo,wib --groups bar,8 " + "--keywords TestOnly,ZStream", out ) self.clicomm( "--cc 1 --cc 2 --blocked 3 --blocked 4 " - "--dependson 5,foo --dependson wib --groups bar --groups 8", + "--dependson 5,foo --dependson wib --groups bar --groups 8 " + "--keywords TestOnly --keywords ZStream", out )
Signed-off-by: Lon Hohberger lhh@redhat.com --- bugzilla.1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/bugzilla.1 b/bugzilla.1 index 658f6c2..02e39b6 100644 --- a/bugzilla.1 +++ b/bugzilla.1 @@ -1,4 +1,4 @@ -.TH bugzilla 1 "August 15, 2013" "version 0.9.0" "User Commands" +.TH bugzilla 1 "January 16, 2014" "version 0.9.0" "User Commands" .SH NAME bugzilla - command-line interface to Bugzilla over XML-RPC .SH SYNOPSIS @@ -73,6 +73,12 @@ add bug_ids blocked by this bug add bug_ids that this bug depends on .IP "--groups=GROUP[, GROUP, ...]" add groups to which bug is visible +.IP "--assigned_to=ASSIGNED_TO" +Assign bugzilla to specified email address +.IP "--qa_contact=QA_CONTACT" +Set QA contact to specified email address +.IP "--keywords=KEYWORD[, KEYWORD, ...]" +Set specified keywords on new bugzilla
.SH OUTPUT FORMAT [oq]NEW[cq] OPTIONS .IP "--full, -f"
I ran these through the run-tests as well as 'python setup.py test --rw-functional' and pylint/pep8.
I can dig up the bugzillas that were created on the test site if desired.
-- Lon
On 01/16/2014 11:02 AM, Lon Hohberger wrote:
Signed-off-by: Lon Hohberger lhh@redhat.com
bin/bugzilla | 10 ++++++++++ bugzilla/base.py | 7 ++++++- bugzilla/rhbugzilla.py | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/bin/bugzilla b/bin/bugzilla index 30a1b13..0ded73e 100755 --- a/bin/bugzilla +++ b/bin/bugzilla @@ -154,6 +154,13 @@ def setup_action_parser(action): p.add_option('--groups', metavar='GROUP[, GROUP, ...]', action="append", help="add groups to which bug is visible")
p.add_option('--assigned_to',
help='Assign bugzilla to specified email address')
p.add_option('--qa_contact',
help='Set QA contact to specified email address')
p.add_option('--keywords',
metavar='KEYWORD[, KEYWORD, ...]', action="append",
help="Set specified keywords on new bugzilla")
elif action == 'query': p.set_description("List bug reports that match the given criteria.")
@@ -836,6 +843,7 @@ def _do_new(bz, opt): depends_on=parse_multi(opt.dependson) or None, description=opt.description or None, groups=parse_multi(opt.groups) or None,
keywords=parse_multi(opt.keywords) or None, op_sys=opt.os or None, platform=opt.arch or None, priority=opt.priority or None,
@@ -844,6 +852,8 @@ def _do_new(bz, opt): summary=opt.summary or None, url=opt.url or None, version=opt.version or None,
assigned_to=opt.assigned_to or None,
qa_contact=opt.qa_contact or None,
)
if opt.test_return_result:
diff --git a/bugzilla/base.py b/bugzilla/base.py index 3a5d65d..b1258e7 100644 --- a/bugzilla/base.py +++ b/bugzilla/base.py @@ -1304,6 +1304,8 @@ class BugzillaBase(object): comment_private=None, blocks=None, cc=None,
assigned_to=None,
keywords=None, depends_on=None, groups=None, op_sys=None,
@@ -1326,6 +1328,8 @@ class BugzillaBase(object): localdict["depends_on"] = self._listify(depends_on) if groups: localdict["groups"] = self._listify(groups)
if keywords:
localdict["keywords"] = self._listify(keywords) if description: localdict["description"] = description if comment_private:
@@ -1338,7 +1342,8 @@ class BugzillaBase(object): platform=platform, priority=priority, qa_contact=qa_contact, resolution=resolution, severity=severity, status=status, target_milestone=target_milestone,
target_release=target_release, url=url)
target_release=target_release, url=url,
assigned_to=assigned_to) ret.update(localdict) return ret
diff --git a/bugzilla/rhbugzilla.py b/bugzilla/rhbugzilla.py index 6eda791..399ecb0 100644 --- a/bugzilla/rhbugzilla.py +++ b/bugzilla/rhbugzilla.py @@ -54,7 +54,7 @@ class RHBugzilla(_parent): getbug_extra_fields = ( _parent.getbug_extra_fields + [ "attachments", "comments", "description",
"external_bugs", "flags",
)"external_bugs", "flags" ]
On 01/16/2014 11:05 AM, Lon Hohberger wrote:
I ran these through the run-tests as well as 'python setup.py test --rw-functional' and pylint/pep8.
I can dig up the bugzillas that were created on the test site if desired.
-- Lon
No need, patches look good, I've pushed them now.
Thanks, Cole
python-bugzilla@lists.stg.fedorahosted.org