Skip to content

PRESIDECMS-3327: add relative between time period types - #1817

Open
jjannek wants to merge 1 commit into
pixl8:stablefrom
jjannek:feature-PRESSYNCED-3105_relative_time_period_between
Open

PRESIDECMS-3327: add relative between time period types#1817
jjannek wants to merge 1 commit into
pixl8:stablefrom
jjannek:feature-PRESSYNCED-3105_relative_time_period_between

Conversation

@jjannek

@jjannek jjannek commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds two time period types, resolved at read time (dates are not frozen on save):
    • betweenago — from N units ago to M units ago (e.g. 48 hours ago → 24 hours ago)
    • betweenupcoming — from N units from now to M units from now (e.g. 24 hours from now → 48 hours from now)
  • Honour pastOnly / futureOnly. Absolute between is unchanged. Inverted offsets are swapped so from is always earlier than to. measure2 = 0 means until/from now.

Fixes the gap where dashboard compares and rules-engine filters could not express a rolling window that does not end at now (today vs yesterday was the only calendar workaround).

Ticket: PRESIDECMS-3327

Test plan

  • Unit tests in RulesEngineTimePeriodServiceTest (48h–24h, missing measure2, swapped offsets, invalid unit, future 24h–48h, omitted unit2)
  • Admin: rules-engine date filter — choose between (relative past), 48 hours ago to 24 hours ago; confirm the configured label and that results match that window
  • Admin: same with between (relative future) on a future date field
  • Dashboard single-value widget with pastOnly: relative past appears, relative future does not
  • Existing between (dates) and recently still work

Allow rolling windows that do not end at now (e.g. 48 hours ago to 24 hours ago, or 24 hours from now to 48 hours from now) without freezing absolute dates.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jjannek jjannek changed the title PRESSYNCED-3105: add relative between time period types PRESIDECMS-3327: add relative between time period types Aug 27, 2026
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.

1 participant