Description
The Task linter’s development-time check for authoredOn does not align with the documented rule that authoredOn must contain #{date}, and it behaves differently from the requester / restriction.recipient placeholder checks.
Current behavior
In FhirTaskLinter#checkPlaceholders, the warning FHIR_TASK_DATE_NO_PLACEHOLDER is only emitted when authoredOn is present and its value does not contain #{date}:
if (authoredOn != null && !authoredOn.contains("#{date}"))
If authoredOn is absent, val(...) returns null, the condition is false, and the linter reports success: <authoredOn> placeholder OK.
By contrast, requester.identifier.value and restriction.recipient.identifier.value use == null || ..., so a missing value does trigger a placeholder warning.
Expected behavior
- If the rule is “template Tasks must declare
authoredOn with #{date}”, then a missing authoredOn should be reported as ERROR.
- Behavior should be consistent with the other placeholder checks in the same method.
Description
The Task linter’s development-time check for
authoredOndoes not align with the documented rule thatauthoredOnmust contain#{date}, and it behaves differently from therequester/restriction.recipientplaceholder checks.Current behavior
In
FhirTaskLinter#checkPlaceholders, the warningFHIR_TASK_DATE_NO_PLACEHOLDERis only emitted whenauthoredOnis present and its value does not contain#{date}:If
authoredOnis absent,val(...)returnsnull, the condition is false, and the linter reports success:<authoredOn> placeholder OK.By contrast,
requester.identifier.valueandrestriction.recipient.identifier.valueuse== null || ..., so a missing value does trigger a placeholder warning.Expected behavior
authoredOnwith#{date}”, then a missingauthoredOnshould be reported as ERROR.