Search
j0ke.net Open Build Service
>
Projects
>
J0KE.NET
:
infrastructure
>
pybugz
> pybugz-0.7.3-search-improvement.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File pybugz-0.7.3-search-improvement.patch of Package pybugz (Revision 5)
Currently displaying revision
5
,
show latest
Index: bugz.py =================================================================== --- bugz.py.orig 2008-05-21 15:26:42.000000000 +0200 +++ bugz.py 2008-05-21 15:28:08.351823000 +0200 @@ -77,6 +77,8 @@ class BugzConfig: 'keywords': '', 'dependson':'', 'blocked':'', + 'product':'', + 'resolution':'fixed', 'component': 'Ebuilds', # needs to be filled in 'bug_file_loc': '', @@ -713,7 +715,7 @@ class Bugz: assigned_to = None, reporter = None, cc = None, commenter = None, whiteboard = None, keywords = None, status = [], severity = [], priority = [], product = [], - component = []): + component = [], resolution = []): """Search bugzilla for a bug. @param query: query string to search in title or {comments}. @@ -748,6 +750,10 @@ class Bugz: @type product: list @keyword component: search within components. empty means all. @type component: list + @keyword product: search within products. empty means all. + @type product: list + @keyword resolution: search for closed bugs with given resolution. empty means all. + @type product: list @return: list of bugs, each bug represented as a dict @rtype: list of dicts @@ -770,6 +776,8 @@ class Bugz: qparams['bug_status'] = [s.upper() for s in status] qparams['product'] = product or '' qparams['component'] = component or '' + qparams['product'] = product or '' + qparams['resolution'] = resolution or '' qparams['status_whiteboard'] = whiteboard or '' qparams['keywords'] = keywords or '' @@ -919,7 +927,7 @@ class Bugz: FIELDS = ('bug_file_loc', 'bug_severity', 'short_desc', 'bug_status', 'status_whiteboard', 'keywords', 'op_sys', 'priority', 'version', 'target_milestone', - 'assigned_to', 'rep_platform', 'product', 'component') + 'assigned_to', 'rep_platform', 'product', 'component', 'resolution') FIELDS_MULTI = ('blocked', 'dependson') @@ -1297,6 +1305,11 @@ class PrettyBugz(Bugz): help = 'Restrict by product (1 or more)'), 'component': make_option('-C', '--component', action='append', help = 'Restrict by component (1 or more)'), + 'product': make_option('-P', '--product', action='append', + help = 'Restrict by product (1 or more)'), + 'resolution': make_option('-R', '--resolution', action='append', + choices = config.choices['resolution'].keys(), + help = 'Restrict by given resolution(1 or more)'), 'keywords': make_option('-k', '--keywords', help = 'Bug keywords'), 'whiteboard': make_option('-w', '--whiteboard', help = 'Status whiteboard'), @@ -1336,6 +1349,8 @@ class PrettyBugz(Bugz): MORE_FIELDS = ( ('product', 'Product'), ('component', 'Component'), + ('product', 'Product'), + ('resolution', 'Resolution'), ('status_whiteboard', 'Whiteboard'), ('keywords', 'Keywords'), )