Skip to content

pybugz doesn't support Package list field #105

@pacho2

Description

@pacho2

I have tried to add it... but for some reason I still get:
'package_list is not a valid parameter for the Bugzilla::Bug::create function.'

Hence, probably I missed something :/
`
--- bugz/cli.py.orig 2018-10-21 11:55:58.890240355 +0200
+++ bugz/cli.py 2018-10-21 11:56:14.675644510 +0200
@@ -190,6 +190,14 @@
else:
log_info('Enter alias (optional): %s' % settings.alias)

  • if not hasattr(settings, 'package_list'):
  •    package_list_msg = 'Enter a Package list for this bug (optional): '
    
  •    line = input(package_list_msg)
    
  •    if len(line):
    
  •        settings.package_list = line
    
  • else:
  •    log_info('Enter a Package list (optional): %s' % settings.package_list)
    
  • if not hasattr(settings, 'assigned_to'):
    assign_msg = 'Enter assignee (eg. [email protected]) (optional): '
    line = input(assign_msg)
    @@ -232,6 +240,7 @@
    def show_bug_info(bug, settings):
    FieldMap = {
    'alias': 'Alias',
  •    'package_list': 'Package list',
       'summary': 'Title',
       'status': 'Status',
       'resolution': 'Resolution',
    

@@ -426,6 +435,8 @@
params['ids'] = [settings.bugid]
if hasattr(settings, 'alias'):
params['alias'] = settings.alias

  • if hasattr(settings, 'package_list'):

  •    params['package_list'] = settings.package_list
    

    if hasattr(settings, 'assigned_to'):
    params['assigned_to'] = settings.assigned_to
    if hasattr(settings, 'blocks_add'):
    @@ -590,6 +601,8 @@
    print('%-12s: %s' % ('Severity', settings.severity))
    if hasattr(settings, 'alias'):
    print('%-12s: %s' % ('Alias', settings.alias))

  • if hasattr(settings, 'package_list'):

  •    print ('%-12s: %s' % ('Package list', settings.package_list))
    

    if hasattr(settings, 'assigned_to'):
    print('%-12s: %s' % ('Assigned to', settings.assigned_to))
    if hasattr(settings, 'cc'):
    @@ -636,6 +649,8 @@
    params['cc'] = settings.cc
    if hasattr(settings, 'url'):
    params['url'] = settings.url

  • if hasattr(settings, 'package_list'):

  •    params['package_list'] = settings.package_list
    

    result = settings.call_bz(settings.bz.Bug.create, params)
    log_info('Bug %d submitted' % result['id'])
    @@ -648,7 +663,7 @@
    valid_keys = ['alias', 'assigned_to', 'component', 'creator',
    'limit', 'offset', 'op_sys', 'platform',
    'priority', 'product', 'resolution', 'severity',

  •              'version', 'whiteboard']
    
  •              'version', 'whiteboard', 'package_list']
    

    params = {}
    d = vars(settings)
    `

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions