From 2d0f2bfffc9b588968a9ede0e32bbf6d9aba0605 Mon Sep 17 00:00:00 2001 From: thanhnv Date: Tue, 8 Sep 2026 10:28:49 +0900 Subject: [PATCH] fix(jira-knowledge): save config before sync to prevent stale base URL error _trigger_sync reads jira config from self.ctx.config.data, but if the user hasn't clicked Save yet the config still holds old/empty values. Add self._save() at the top of _trigger_sync so the current form values (base URL, email, token, project mapping) are persisted to config before the background sync job reads them. Co-Authored-By: Claude Opus 5 --- ui/connectors_panel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/connectors_panel.py b/ui/connectors_panel.py index 6916abc..e5a5504 100644 --- a/ui/connectors_panel.py +++ b/ui/connectors_panel.py @@ -235,6 +235,9 @@ class JiraConnectDialog(QDialog): def _trigger_sync(self) -> None: """Trigger a background sync job using JiraSyncService.""" + # Save current form values to config before syncing — otherwise the + # sync job reads stale/empty config if the user hasn't clicked Save yet. + self._save() self.sync_status.setText(tr("connectors.jira_kb_syncing")) self.sync_btn.setEnabled(False)