Skip to content

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

@danielghost

Description

@danielghost

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);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Assigned

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions