Skip to content

Conditional questions: branches on date and time - #3835

Draft
AndyScherzinger wants to merge 1 commit into
feat/conditional-questions-2-checkboxesfrom
feat/conditional-questions-3-date-time
Draft

AndyScherzinger wants to merge 1 commit into
feat/conditional-questions-2-checkboxesfrom
feat/conditional-questions-3-date-time

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Part 3 of the conditional questions stack from #3123 (by Micke Nordin, with fixes by TimedIn and the review fixes). Based on #3834; the "Files changed" tab shows only this part.

Stack

  1. Conditional questions: base with radio and dropdown questions #3833 Conditional questions: base with radio and dropdown questions
  2. Conditional questions: branches on checkboxes #3834 Conditional questions: branches on checkboxes
  3. Conditional questions: branches on date and time #3835 Conditional questions: branches on date and time ← this PR
  4. Conditional questions: follow-up questions on linear scale questions #3837 Conditional questions: follow-up questions on linear scale questions

This PR

A date or time question leads to a group of follow-up questions when the answer lies within a range, both limits included. Each range is a row below the answer field with a start, an end and the same select as on options; either limit can be left out. Ranges may overlap, then all their groups are shown. A time range across midnight is written as two ranges, which the editor says.

  • condition date_range with min and/or max in the format of the question (Y-m-d, H:i); the start must not be after the end;
  • questions that ask for a range of dates or times have no follow-up questions, and the editor offers only one of the two;
  • date and time questions of old forms (datetime) get no follow-up questions, as suggested in Conditional questions: base with radio and dropdown questions #3833 (comment);
  • matching cases added to the shared fixture, docs and tests.

Tests

  • PHPUnit passes, except the 15 IUserFolder errors main has as well on the test instance.
  • php-cs-fixer, psalm and vue-tsc show no new findings compared to main; eslint is clean; the build works.
  • Tested on a running instance: a date range leads to a group and is stored; axe reports no violations from this stack.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/Service/FormsService.php 95.00% 1 Missing ⚠️
lib/Service/SubmissionService.php 80.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from a9f1f27 to f0235a8 Compare November 4, 2026 14:07
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-2-checkboxes branch 2 times, most recently from 924a809 to d06f7a4 Compare November 4, 2026 14:20
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from f0235a8 to a5dc275 Compare November 4, 2026 14:20
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-2-checkboxes branch from d06f7a4 to fc6e821 Compare November 4, 2026 16:51
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from a5dc275 to 62a5b50 Compare November 4, 2026 16:51
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-2-checkboxes branch from fc6e821 to 1859666 Compare November 5, 2026 11:10
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from 62a5b50 to 7262451 Compare November 5, 2026 11:10
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-2-checkboxes branch from 1859666 to 25ab176 Compare November 7, 2026 15:29
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from 7262451 to 39cc9b5 Compare November 7, 2026 15:29
@AndyScherzinger AndyScherzinger changed the title Conditional questions: date and time as trigger Conditional questions: branches on date and time Nov 7, 2026
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from 39cc9b5 to ea3004c Compare November 7, 2026 15:41
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-2-checkboxes branch 2 times, most recently from 87eb88f to af4bacf Compare November 8, 2026 18:03
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch 2 times, most recently from 50ca16b to e494c4f Compare November 9, 2026 11:40
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-2-checkboxes branch from af4bacf to 17b0938 Compare November 9, 2026 11:40
@AndyScherzinger
AndyScherzinger marked this pull request as draft November 9, 2026 21:38
@AndyScherzinger AndyScherzinger added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Nov 9, 2026
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from e494c4f to e097fb2 Compare November 10, 2026 00:47
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-2-checkboxes branch from 17b0938 to 95ed77a Compare November 10, 2026 00:47
A date or time question leads to a group of follow-up questions when
the answer lies within a range, both limits included. Each range is a
row below the answer field with a start, an end and the same select as
on options; either limit can be left out. Ranges may overlap, then all
their groups are shown. A time range across midnight is written as two
ranges.

A condition date_range holds the limits in the format of the question,
Y-m-d or H:i, and the start must not be after the end. Questions that
ask for a range of dates or times have no follow-up questions, and the
editor offers only one of the two. Date and time questions of old forms
do not get follow-up questions.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from e097fb2 to e949ef0 Compare November 10, 2026 01:08
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-2-checkboxes branch from 95ed77a to 1d34ba0 Compare November 10, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant