Skip to content

Document AddDays and AddHours date filters - #3326

Open
NickJosevski wants to merge 2 commits into
mainfrom
nj/date-filters
Open

Document AddDays and AddHours date filters#3326
NickJosevski wants to merge 2 commits into
mainfrom
nj/date-filters

Conversation

@NickJosevski

@NickJosevski NickJosevski commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Documents the two new date filters added in OctopusDeploy/Octostache#124 which has gone out in 3.9.3

Raised from ticket 215987, who need a ServiceNow change window of start + 2 hours computed entirely from Octopus variables.

Changes

  • variable-filters.mdAddDays and AddHours rows in the date-filters table, plus an ### AddDays and AddHours section covering negative and fractional amounts, time-zone preservation, and the echo-on-bad-input behaviour.
  • variable-substitutions.mdx — both added to the flat filter list.

Worked example + caveat

The section ends with the ServiceNow change-window example, and a warning that Octopus.Task.QueueTime is queue time, not execution start — so a window derived from it starts counting down while the task is still queued. For an immediate deployment the two are interchangeable, but a task waiting behind another deployment or on a busy worker pool can fall outside its own implementation window before any steps run.

The per-environment pattern in that callout scopes the whole expression rather than just the hour count, because a filter argument that is itself a variable can't be followed by another filter in the same chain (a pre-existing Octostache parser limitation, verified against Format, Append and Truncate too).

🤖 Generated with Claude Code

@team-marketing-branch-protections

Copy link
Copy Markdown

Pull request environment is available at https://stoctodocspr3326.z22.web.core.windows.net.

You can view the ephemeral environment status in Octopus Deploy.

This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity.

NickJosevski and others added 2 commits August 10, 2026 21:05
Includes a worked ServiceNow change-window example, and a warning that
Octopus.Task.QueueTime is queue time rather than execution start, so a
window derived from it starts counting down while the task is queued.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CI lints only changed files, so editing this page surfaces violations that
already fail on main. Limited to what the linter actually reports: two
misaligned tables, asterisk list markers, a hard tab, trailing whitespace,
duplicate blank lines, and a missing blank line after a heading.

Each table keeps its own separator style, so the diff stays close to what
the rules require.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants