Skip to content

Commit 5e1b36c

Browse files
committed
Try to fix failing tests
Signed-off-by: Micke Nordin <[email protected]>
1 parent 1886b63 commit 5e1b36c

File tree

13 files changed

+1353
-108
lines changed

13 files changed

+1353
-108
lines changed

lib/Migration/Version050300Date20260118000000.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@
1616
use OCP\Migration\SimpleMigrationStep;
1717

1818
/**
19-
* Migration to add parent_question_id and branch_id columns to support conditional questions.
20-
*
21-
* Conditional questions allow form builders to create branching logic where subquestions
22-
* are shown based on the answer to a parent trigger question.
23-
*
24-
* - parent_question_id: References the parent conditional question (null for top-level questions)
25-
* - branch_id: Identifies which branch this subquestion belongs to within the parent conditional
19+
* Add parent_question_id and branch_id columns for conditional questions
2620
*/
2721
class Version050300Date20260118000000 extends SimpleMigrationStep {
2822

lib/ResponseDefinitions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* validationType?: string
4343
* }
4444
*
45-
* @psalm-type FormsQuestionType = "dropdown"|"multiple"|"multiple_unique"|"date"|"time"|"short"|"long"|"file"|"datetime"
45+
* @psalm-type FormsQuestionType = "dropdown"|"multiple"|"multiple_unique"|"date"|"time"|"short"|"long"|"file"|"datetime"|"color"|"conditional"
4646
*
4747
* @psalm-type FormsQuestion = array{
4848
* id: int,
@@ -56,6 +56,8 @@
5656
* extraSettings: FormsQuestionExtraSettings|\stdClass,
5757
* options: list<FormsOption>,
5858
* accept: list<string>,
59+
* parentQuestionId?: ?int,
60+
* branchId?: ?string,
5961
* }
6062
*
6163
* @psalm-type FormsAnswer = array{

openapi.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,15 @@
426426
"items": {
427427
"type": "string"
428428
}
429+
},
430+
"parentQuestionId": {
431+
"type": "integer",
432+
"format": "int64",
433+
"nullable": true
434+
},
435+
"branchId": {
436+
"type": "string",
437+
"nullable": true
429438
}
430439
}
431440
},
@@ -536,7 +545,9 @@
536545
"short",
537546
"long",
538547
"file",
539-
"datetime"
548+
"datetime",
549+
"color",
550+
"conditional"
540551
]
541552
},
542553
"Share": {
@@ -1621,6 +1632,19 @@
16211632
"nullable": true,
16221633
"default": null,
16231634
"description": "(optional) id of the question that should be cloned"
1635+
},
1636+
"parentQuestionId": {
1637+
"type": "integer",
1638+
"format": "int64",
1639+
"nullable": true,
1640+
"default": null,
1641+
"description": "(optional) id of the parent conditional question (for subquestions)"
1642+
},
1643+
"branchId": {
1644+
"type": "string",
1645+
"nullable": true,
1646+
"default": null,
1647+
"description": "(optional) branch id within the parent conditional question"
16241648
}
16251649
}
16261650
}

0 commit comments

Comments
 (0)