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.
wip
MasterofJOKers 2 years ago
parent 6c1667046b
commit 6596be6c1e

@ -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)

Loading…
Cancel
Save