diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2019-12-18 16:41:56 +0000 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2019-12-18 16:41:56 +0000 |
commit | 171299fe5f3ce3f220cb703cad7cd92fee55b589 (patch) | |
tree | 58bc90bf3a14062d0ff9e0aa0c94b267e2b9f8b4 | |
parent | 8670cab0f929a925f3eeb1be4ad92b5592ee9a86 (diff) |
ldtstool: Add filters to identify missing worklogs.
-rwxr-xr-x | bin/ldtstool | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/ldtstool b/bin/ldtstool index abfd434..0ef0ad0 100755 --- a/bin/ldtstool +++ b/bin/ldtstool @@ -456,7 +456,10 @@ def do_filter(issues, **args): i['worklog'] = [ w for w in i['worklog'] if filter_by(w['author'], args['worklog_by'].split(',')) ] - if args['no_worklog']: + if args['empty_worklog']: + issues = [ i for i in issues if not i['worklog'] ] + + if args['no_empty_worklog']: issues = [ i for i in issues if i['worklog'] ] # Go though the issues and ensure we "unfilter" any parent tickets @@ -739,7 +742,7 @@ def do_selftest_cmd(args): def do_spy_cmd(args): issues = do_fetch(since=args.since) - do_filter(issues, worklog_since=args.since, worklog_by=args.on, no_worklog=True) + do_filter(issues, worklog_since=args.since, worklog_by=args.on, no_empty_worklog=True) if args.by_card: do_chart(issues, effort_by_card=args.output) else: @@ -795,7 +798,9 @@ def main(argv): s.add_argument('--since') s.add_argument('--strict', action='store_true') s.add_argument('--no-keep-parent', action='store_true') - s.add_argument('--no-worklog', action='store_true', + s.add_argument('--empty-worklog', action='store_true', + help='Keep only cards without any worklog attached') + s.add_argument('--no-empty-worklog', action='store_true', help='Filter cards without any worklog attached') s.add_argument('--worklog-by', help="Select only worklogs by this user") |