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 <noreply@anthropic.com>
This commit is contained in:
thanhnv
2026-09-08 10:28:49 +09:00
co-authored by Claude Opus 5
parent 9d42d38d83
commit 2d0f2bfffc
+3
View File
@@ -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)