Skip to content

Commit ef36aef

Browse files
Add support for custom parameters
This adds support for custom parameters in bugzilla modify. This needs to be given in form: key1=val:key2=val:...
1 parent a502f9a commit ef36aef

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

bugz/cli.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,17 @@ def modify(settings):
513513
params['version'] = settings.version
514514
if hasattr(settings, 'whiteboard'):
515515
params['whiteboard'] = settings.whiteboard
516+
if hasattr(settings, 'custom'):
517+
custom_options = settings.custom.split(':')
518+
import pdb
519+
pdb.set_trace()
520+
for custom_option in custom_options:
521+
try:
522+
key,value = custom_option.split('=',1)
523+
params[key] = value
524+
except:
525+
print("Badly formatted option :{}".format(custom_option))
526+
pass
516527

517528
if hasattr(settings, 'fixed'):
518529
params['status'] = 'RESOLVED'

bugz/cli_argparser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ def make_arg_parser():
183183
help='change the priority for this bug')
184184
modify_parser.add_argument('--product',
185185
help='change the product for this bug')
186+
modify_parser.add_argument('--custom',
187+
help='change custom parameters for this bug')
186188
modify_parser.add_argument('-r', '--resolution',
187189
help='set new resolution '
188190
'(if status = RESOLVED)')

0 commit comments

Comments
 (0)