From c90d8e7fc825c03eb7d9a7cf721e14d81f65f006 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Thu, 29 Sep 2022 22:31:32 +0200 Subject: [PATCH] Make Jira integration optional --- src/fime/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fime/main.py b/src/fime/main.py index f492fb1..570c410 100755 --- a/src/fime/main.py +++ b/src/fime/main.py @@ -139,10 +139,13 @@ class App: add_tasks(["Nothing"]) menu_items.append((1, None)) - menu_items.append(("Import Jira task", partial(self.open_new_dialog, self.import_task))) + jira_integration = self.config.jira_url and self.config.jira_token + if jira_integration: + menu_items.append(("Import Jira task", partial(self.open_new_dialog, self.import_task))) menu_items.append(("Edit tasks", partial(self.open_new_dialog, self.taskEdit))) menu_items.append(("Report", partial(self.open_new_dialog, self.reportDialog))) - menu_items.append(("Worklog", partial(self.open_new_dialog, self.worklogDialog))) + if jira_integration: + menu_items.append(("Worklog", partial(self.open_new_dialog, self.worklogDialog))) menu_items.append((1, None))