mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-07 07:19:16 +00:00
fix(automation): stop the list claiming an automation never runs
An automation can be triggered two ways, and they are stored in different places: global triggers live in the automation settings, event triggers live on the event itself, inside the rundown. The panel only ever receives the first list. So the Runs on column was reading an automation attached to ten events as having no triggers at all, and saying "Never runs" about something that runs perfectly well. Worse than a missing hint: it taught that event triggers do not count. The client cannot honestly answer the question either, since it holds only the rundown that is currently loaded and a project can have several. So the column no longer answers it. An empty cell now reads as an em dash, the same as the filter rule column beside it, and claims nothing. The "No outputs" tag stays. An automation with nothing to send does nothing whatever triggers it, and that the panel can see for itself. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AfDKsy6PE3Rbyt32Fg4YKf
This commit is contained in:
@@ -145,13 +145,20 @@ export default function AutomationsList({
|
||||
<tr key={automationId}>
|
||||
<td>{automation.title}</td>
|
||||
<td>
|
||||
<div className={style.tags}>
|
||||
{lifecycles.length === 0 ? (
|
||||
<Tag variant='warning'>Never runs</Tag>
|
||||
) : (
|
||||
lifecycles.map((cycle) => <Tag key={cycle}>{getLifecycleLabel(cycle)}</Tag>)
|
||||
)}
|
||||
</div>
|
||||
{/*
|
||||
* Only global triggers are visible here: an automation can also be attached to
|
||||
* single events, which live in the rundown. An empty cell is therefore not the
|
||||
* same as never running, so it says nothing rather than claiming that.
|
||||
*/}
|
||||
{lifecycles.length === 0 ? (
|
||||
<span className={style.muted}>—</span>
|
||||
) : (
|
||||
<div className={style.tags}>
|
||||
{lifecycles.map((cycle) => (
|
||||
<Tag key={cycle}>{getLifecycleLabel(cycle)}</Tag>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
<td>
|
||||
{automation.filters.length === 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user