Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pybugz doesn't support Package list field #105

Open
pacho2 opened this issue Oct 21, 2018 · 1 comment
Open

pybugz doesn't support Package list field #105

pacho2 opened this issue Oct 21, 2018 · 1 comment

Comments

@pacho2
Copy link

pacho2 commented Oct 21, 2018

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. liquidx@gentoo.org) (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)
    `

@pacho2
Copy link
Author

pacho2 commented Oct 21, 2018

cly.py.txt
I attach the diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant