The Timeout node-feature form infers the deadline mode from which field is filled: entering an "Until (date variable)" silently overrides the duration and "Measured from", and both modes' fields show at once. It is hard to tell which fields apply.

Make the relative-vs-absolute choice explicit and the form self-explanatory:

  • A "Deadline" selector with two modes: "After a duration" (relative) and "Until a date" (absolute). It defaults to "After a duration" when no value is set.
  • Only the selected mode's fields show (relative: duration + "Measured from"; absolute: the date or variable + offset), via #states.
  • Validation and save are gated on the selected mode: saving writes only that mode's keys and clears the other mode's leftover values, so the stored config represents exactly one mode. The #states hiding is cosmetic; the save is authoritative.
  • The selector is UI only: no stored mode key and no schema change. The single source of truth stays "which field is set", and the runtime reads that.

Each value field accepts a literal or a process variable, resolved at runtime: a value that parses as a duration is literal, otherwise it is a variable holding a duration; the date field symmetrically accepts a literal date or a variable. This subsumes a "duration from a variable" case without adding a fourth mode entry. parkDeadline() gains the literal-or-variable resolution.

Default when empty is relative ("After a duration"), preserving today's empty-duration behavior (the site default, or no timeout when there is no site default).

Issue fork orchestra-3605939

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed 45772f36 on 1.x
    feat: #3605939 Timeout node feature: make the relative/absolute deadline...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.