summaryrefslogtreecommitdiffstats
path: root/bugzilla
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2007-10-02 14:13:07 -0400
committerWill Woods <wwoods@redhat.com>2007-10-02 14:13:07 -0400
commitb5c728a23ae07cbd41dacd83057901ce0c20570c (patch)
tree2683b278304e024eb508f80e99b6f703e6527263 /bugzilla
parentd89d43cf4f4554ba8228759cbc28bac454cb2708 (diff)
downloadpython-bugzilla-b5c728a23ae07cbd41dacd83057901ce0c20570c.zip
python-bugzilla-b5c728a23ae07cbd41dacd83057901ce0c20570c.tar.gz
python-bugzilla-b5c728a23ae07cbd41dacd83057901ce0c20570c.tar.xz
add --blocked and --dependson
Diffstat (limited to 'bugzilla')
-rwxr-xr-xbugzilla15
1 files changed, 13 insertions, 2 deletions
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.")
-