[Instrument] LINST Standard Date field Always Required, not working with conditional XIN rules #7650
Labels
24.0.0-bugs
Issues or bug fix PRs that were raised during the testing of release 24.0.0
Category: Bug
PR or issue that aims to report or fix a bug
The LINST Standard Date field type seems to be required Always.
Unlike other fields that come with a
_status
field (e.g. textarea), this field can't be made conditional (not required) using XIN rules.This is a bug, and there is probably an easy fix based on how textarea (or numeric etc) are implemented.
Example: I have a LINST questionnaire that asks:
surgery_done
yes/no/not answered (Dropdown)surgery_date
date plus not answered (StandardDate)Question 2 should be required Only If Surgery was actually done -- i.e.
surgery_done == yes
and a XIN rule is in place (* see below) to express this dependency.
However this field always gives an error (
A date is required, or not answered
) even whensurgery_done == no
.Note: not answered is a valid option for this field (even when the surgery was done) so Standard Date is the most suitable date type.
(*) This Xin rule should, but does not, make the field conditional:
surgery_date{-}Required{-}surgery_done{@}=={@}yes
suggested fix : check against
textarea
implementation in the instrument class, which allows Xin rules to override this type of constraintOR ELSE: Document clearly for users of the Instrument Builder / Linst that Standard Date fields can Never be conditional.
The text was updated successfully, but these errors were encountered: