Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkCompletionStatusFor doesn't complete if model and its children are optional and trickled #526

Open
danielghost opened this issue Apr 30, 2024 · 2 comments · May be fixed by #532
Open
Assignees
Labels
bug Something isn't working

Comments

@danielghost
Copy link
Contributor

If a model and its children are "_isOptional": true and set to use a trickle button, the model does not mark as _isComplete because the trickle button is not visually available to be completed.

Whilst the JSON is unlikely to be configured this way whilst authoring, it is possible when using a role selector or diagnostic type plugin which can dynamically update _isOptional depending on user choices.

This can be resolved by excluding non-trackable components such as the trickle button from:

const children = this.getAvailableChildModels();

It might be useful to create an API method returning these models so it can be used elsewhere as required:

return this.getAvailableChildModels().filter(child => child.get('_isTrackable') !== false);
@oliverfoster
Copy link
Member

yes please

@oliverfoster
Copy link
Member

oliverfoster commented Jun 4, 2024

If a model and its children are "_isOptional": true and set to use a trickle button, the model does not mark as _isComplete because the trickle button is not visually available to be completed.

Why is the button not visible? Do you have code in trickle that's causing this anomaly?

@joe-allen-89 joe-allen-89 moved this from Needs Reviewing to Assigned in adapt_framework: The TODO Board Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants