Auto-commit local changes before build (2026-01-19 13:31:09)

This commit is contained in:
Ivo Oskamp 2026-01-19 13:31:09 +01:00
parent 2887a021ba
commit d272d12d24
3 changed files with 24 additions and 1 deletions

View File

@ -1 +1 @@
v20260119-06-runchecks-renderRun-fix v20260119-07-autotask-propagate-ticket-to-all-runs

View File

@ -1091,12 +1091,27 @@ def api_run_checks_create_autotask_ticket():
if existing_id and int(existing_id) != ticket_id_int: if existing_id and int(existing_id) != ticket_id_int:
continue continue
# Ensure all open runs get BOTH the Autotask ticket id and number.
# Some runs may already have the id (indicator) but still miss the number.
if not existing_id: if not existing_id:
r.autotask_ticket_id = ticket_id_int r.autotask_ticket_id = ticket_id_int
r.autotask_ticket_number = ticket_number_str r.autotask_ticket_number = ticket_number_str
r.autotask_ticket_created_at = getattr(run, "autotask_ticket_created_at", None) r.autotask_ticket_created_at = getattr(run, "autotask_ticket_created_at", None)
r.autotask_ticket_created_by_user_id = getattr(run, "autotask_ticket_created_by_user_id", None) r.autotask_ticket_created_by_user_id = getattr(run, "autotask_ticket_created_by_user_id", None)
db.session.add(r) db.session.add(r)
else:
updated = False
if not (getattr(r, "autotask_ticket_number", None) or "").strip():
r.autotask_ticket_number = ticket_number_str
updated = True
if getattr(r, "autotask_ticket_created_at", None) is None:
r.autotask_ticket_created_at = getattr(run, "autotask_ticket_created_at", None)
updated = True
if getattr(r, "autotask_ticket_created_by_user_id", None) is None:
r.autotask_ticket_created_by_user_id = getattr(run, "autotask_ticket_created_by_user_id", None)
updated = True
if updated:
db.session.add(r)
run_ids_to_link.append(int(r.id)) run_ids_to_link.append(int(r.id))

View File

@ -248,6 +248,14 @@ Changes:
- Replaced the invalid renderModal() call with renderRun() to correctly refresh the run state and UI. - Replaced the invalid renderModal() call with renderRun() to correctly refresh the run state and UI.
- Prevented UI failure after successful Autotask ticket creation while preserving backend behavior. - Prevented UI failure after successful Autotask ticket creation while preserving backend behavior.
## v20260119-07-autotask-propagate-ticket-to-all-runs
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.
*** ***
## v0.1.21 ## v0.1.21