From b5c728a23ae07cbd41dacd83057901ce0c20570c Mon Sep 17 00:00:00 2001 From: Will Woods Date: Tue, 2 Oct 2007 14:13:07 -0400 Subject: add --blocked and --dependson --- bugzilla | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'bugzilla') diff --git a/bugzilla b/bugzilla index 5bf4a10..18ee419 100755 --- a/bugzilla +++ b/bugzilla @@ -98,6 +98,10 @@ def modify_parser(parser,action): help="search cc lists for given address") p.add_option('-a','--assigned_to', help="search for bugs assigned to this address") + p.add_option('--blocked', + help="search for bugs that block this bug ID") + p.add_option('--dependson', + help="search for bugs that depend on this bug ID") p.add_option('-b','--bug_id', help="specify individual bugs by IDs, separated with commas") p.add_option('-t','--bug_status',default="NEW,VERIFIED,ASSIGNED,NEEDINFO,ON_DEV,FAILS_QA,REOPENED", @@ -185,8 +189,10 @@ if __name__ == '__main__': # Construct the query from the list of queryable options q = dict() email_count = 1 + chart_id = 0 for a in ('product','component','version','long_desc','bug_id', - 'short_desc','cc','assigned_to','bug_status'): + 'short_desc','cc','assigned_to','bug_status', + 'blocked','dependson'): if hasattr(opt,a): i = getattr(opt,a) if i: @@ -199,6 +205,12 @@ if __name__ == '__main__': q['email%i' % email_count] = i q['email%s%i' % (a,email_count)] = True email_count += 1 + elif a in ('blocked','dependson'): + # Chart args are weird. + q['field%i-0-0' % chart_id] = a + q['type%i-0-0' % chart_id] = 'equals' + q['value%i-0-0' % chart_id] = i + chart_id += 1 else: q[a] = i log.debug("bz.query: %s", q) @@ -249,4 +261,3 @@ if __name__ == '__main__': print b else: parser.error("opt.output was set to something weird.") - -- cgit