From 6596be6c1ebdbf3c54d9479ee6a1160f2ff821a8 Mon Sep 17 00:00:00 2001 From: MasterofJOKers Date: Tue, 25 Oct 2022 22:30:39 +0200 Subject: [PATCH] Let the user query issues without default project When the user sets --project to an empty string, we will not add the default project from the config anymore. --- jiracli/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jiracli/cli.py b/jiracli/cli.py index 17c9ed3..da46d5c 100644 --- a/jiracli/cli.py +++ b/jiracli/cli.py @@ -102,9 +102,8 @@ def version(client): @pass_client @pass_config def issues(config, client, project, components, status, labels, texts, flagged, order, asc, jql): - if not project and config.has_section('filters') and config.get('filters', 'default_project'): + if project is None and config.has_section('filters') and config.get('filters', 'default_project'): project = config['filters']['default_project'] - project_jql = f"project = {project}" # TODO add filtering by created since # TODO add filtering by updated @@ -145,6 +144,7 @@ def issues(config, client, project, components, status, labels, texts, flagged, filters.append(flagged_jql) if project: + project_jql = f"project = {project}" filters.append(project_jql) jql = ' AND '.join(filters)