Files
ontime/apps/client
Claude 85d89b24b8 fix(automation): make creating from a recipe retry-safe too
Review caught the recipe dialog having the same shape of bug as the form, one
step earlier. addAutomation ran unconditionally on every attempt, so a trigger
request that failed left an automation behind and pressing create again made a
second one. With a recipe that binds more than one lifecycle, the cycles that
had succeeded would then exist on both, and the show would fire them twice.

The comment there claimed the half created automation was recoverable, which it
was, but only by abandoning the dialog: the retry the error message offered was
the thing that duplicated it.

The dialog now records what it has already put on the server. A second attempt
edits that automation rather than creating another, so parameters corrected
after the failure are still applied, and adds only the triggers still missing.

Verified by failing the first trigger request: the failed attempt leaves one
automation with no trigger, and the retry reuses it and adds the trigger, rather
than leaving two automations behind.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AfDKsy6PE3Rbyt32Fg4YKf
2026-09-09 15:32:34 +00:00
..
2026-03-08 16:22:12 +01:00
2026-08-28 12:04:02 +02:00
2026-03-08 16:22:12 +01:00
2026-03-08 16:22:12 +01:00
2023-05-18 14:02:22 +02:00