diff --git a/.last-branch b/.last-branch index 0dcaca2..5831d0b 100644 --- a/.last-branch +++ b/.last-branch @@ -1 +1 @@ -v20260119-07-autotask-propagate-ticket-to-all-runs +v20260119-08-autotask-disable-toggle-persist diff --git a/containers/backupchecks/src/backend/app/main/routes_settings.py b/containers/backupchecks/src/backend/app/main/routes_settings.py index 96dba4d..d9d5764 100644 --- a/containers/backupchecks/src/backend/app/main/routes_settings.py +++ b/containers/backupchecks/src/backend/app/main/routes_settings.py @@ -435,8 +435,10 @@ def settings(): settings.ui_timezone = (request.form.get("ui_timezone") or "").strip() or "Europe/Amsterdam" # Autotask integration - if "autotask_enabled" in request.form: - settings.autotask_enabled = bool(request.form.get("autotask_enabled")) + # Checkbox inputs are omitted from request.form when unchecked. + # Only apply the enabled toggle when the Autotask form was submitted. + if autotask_form_touched: + settings.autotask_enabled = "autotask_enabled" in request.form if "autotask_environment" in request.form: env_val = (request.form.get("autotask_environment") or "").strip().lower() diff --git a/docs/changelog.md b/docs/changelog.md index aaa15ce..0eb8996 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -250,12 +250,19 @@ Changes: ## v20260119-07-autotask-propagate-ticket-to-all-runs -Changes: +### Changes: - Fixed ticket propagation logic so Autotask ticket numbers are applied to all open runs (reviewed_at IS NULL), not only the most recent run. - Ensured runs that already had an autotask_ticket_id but were missing the autotask_ticket_number are now correctly updated. - Restored legacy behavior where all active runs for the same job consistently display the linked ticket in Tickets, Tickets/Remarks, and Job Details. - Prevented partial ticket linkage that caused only the newest run to show the ticket number. +## v20260119-08-autotask-disable-toggle-persist + +### Changes: +- Fixed persistence of the “Enable Autotask integration” setting so disabling the integration is correctly saved. +- Updated form handling to explicitly set the Autotask enabled flag when the checkbox is unchecked, instead of implicitly keeping the previous value. +- Prevented the Autotask integration from being automatically re-enabled after saving settings. + *** ## v0.1.21