avniproject / avniproject/avni-client
skipAnswers(...) not working with Subject concept type
- Dominant language
- JavaScript
- Stars
- 12
- Forks
- 36
- Avg merge
- 26m
- Merged PRs (30d)
- 3
Description
### Issue:
status.answersToSkip = [uuid] works but skipAnswers(...) doesn't work. showAnswers(...) works with subject concept type.
### Sample rule to try:
```
'use strict';
({params, imports}) => {
const encounter = params.entity;
const formElement = params.formElement;
const statusBuilder = new imports.rulesConfig.FormElementStatusBuilder({encounter, formElement});
// Subject UUID(s) to show; empty list shows all members.
const toSkipMemberUUIDs = ['subject uuid to skip'];
statusBuilder.skipAnswers(...toSkipMemberUUIDs);
return statusBuilder.build();
};
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with FormElementStatusBuilder and compare the skipAnswers(...) behavior with the working showAnswers(...) path for a Subject concept type. Reproduce the sample rule using a subject UUID, then verify that the specified subject answers are skipped in the built status, matching the behavior of status.answersToSkip.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100