fix(template): preserve per-script ExecutionTimeoutSeconds across UI edits; add alarm fallback tests (#9)
The UI script editor has no ExecutionTimeoutSeconds control (authoring deferred), so a body edit silently cleared a timeout set via Transport import. Round-trip the loaded value so UI edits preserve it. Add the missing AlarmExecutionActor null/<=0 fallback tests for symmetry with ScriptExecutionActor.
This commit is contained in:
@@ -117,6 +117,9 @@
|
||||
private string? _scriptParameters;
|
||||
private string? _scriptReturn;
|
||||
private bool _scriptIsLocked;
|
||||
// Round-tripped from the loaded script so UI edits preserve a timeout set
|
||||
// via Transport import (no authoring control in the UI — scoped out).
|
||||
private int? _scriptExecutionTimeoutSeconds;
|
||||
private string? _scriptFormError;
|
||||
private string _scriptModalTab = "trigger"; // "trigger" | "code" | "parameters" | "return"
|
||||
private MonacoEditor? _scriptEditor;
|
||||
@@ -1797,6 +1800,7 @@
|
||||
_scriptParameters = null;
|
||||
_scriptReturn = null;
|
||||
_scriptIsLocked = false;
|
||||
_scriptExecutionTimeoutSeconds = null;
|
||||
_scriptModalTab = "trigger";
|
||||
ResetScriptTestRun();
|
||||
}
|
||||
@@ -1814,6 +1818,9 @@
|
||||
_scriptParameters = script.ParameterDefinitions;
|
||||
_scriptReturn = script.ReturnDefinition;
|
||||
_scriptIsLocked = script.IsLocked;
|
||||
// Preserve any timeout set via Transport import — the UI has no authoring
|
||||
// control for this field, so we round-trip the loaded value unchanged.
|
||||
_scriptExecutionTimeoutSeconds = script.ExecutionTimeoutSeconds;
|
||||
_scriptModalTab = "trigger";
|
||||
ResetScriptTestRun();
|
||||
}
|
||||
@@ -1907,6 +1914,9 @@
|
||||
ReturnDefinition = _scriptReturn,
|
||||
IsLocked = _scriptIsLocked,
|
||||
MinTimeBetweenRuns = DurationInput.Compose(_scriptMinTimeValue, _scriptMinTimeUnit),
|
||||
// Round-trip the loaded value — no UI control, so preserve
|
||||
// any timeout set via Transport import unchanged.
|
||||
ExecutionTimeoutSeconds = _scriptExecutionTimeoutSeconds,
|
||||
IsInherited = existing.IsInherited,
|
||||
LockedInDerived = existing.LockedInDerived,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user