Description
document.querySelectorAll(`div.row[for^="${CSS.escape(id)}"]`) in Form.js returns multiple div elements if there are input parameter types which have codes that share a prefix (e.g. my-code and my-code-2) causing an additional input to be generated which might not be allowed according to the Task's StructureDefinition. Replacing for^= with for= solves this problem in my case.
Effected DSF Version
To Reproduce
Prerequisites:
- Process plugin including Draft Tasks with input parameter types that have codes which share prefixes
- StructureDefinition of the Draft Tasks must specify that only one of these input parameters is allowed each
Steps to reproduce the behavior:
- Try to start a process with such a Draft Task via the FHIR server's ui
- FHIR server returns 403 because two inputs for the same input parameter were generated
Expected Behavior
200 response
Logs
FHIR:
The task here has two input parameters with type codes timer-interval and timer-interval-between-pings
Create of Task unauthorized, resource not valid: [Task 1:1296 - ERROR: Task.input:timer-interval: max allowed = 1, but found 2 (from http://dsf.dev/fhir/StructureDefinition/dsf-task-start-monitor-ping-autostart|1.1)]
Description
document.querySelectorAll(`div.row[for^="${CSS.escape(id)}"]`)in Form.js returns multipledivelements if there are input parameter types which have codes that share a prefix (e.g.my-codeandmy-code-2) causing an additional input to be generated which might not be allowed according to the Task's StructureDefinition. Replacingfor^=withfor=solves this problem in my case.Effected DSF Version
To Reproduce
Prerequisites:
Steps to reproduce the behavior:
Expected Behavior
200 response
Logs
FHIR:
The task here has two input parameters with type codes
timer-intervalandtimer-interval-between-pings