kobotoolbox / enketo-express

We've moved! Please use the new repository 🠊 https://github.com/enketo/enketo-express
Apache License 2.0
102 stars 90 forks source link

Row-based repeating group calculation not working correctly #1108

Closed MartijnR closed 6 years ago

MartijnR commented 6 years ago

see Paul's email on 8/24.

Looks like position(..) is not working correctly perhaps

MartijnR commented 6 years ago
MartijnR commented 6 years ago

The values are correctly stored in the model (as 1 Standing, 2 Sitting, 3 Lying) but shown incorrectly to user (as 3 Lying, 3 Lying, 3 Lying).

A very interesting bug!

MartijnR commented 6 years ago

The issue is in the relevant.js module enable override. This function bypasses the isRelevant check. Don't remember why.

MartijnR commented 6 years ago

Looks like the bug is in calculate.js in Enketo Core when the update function is called with a relevantPath only, and that relevantPath is a repeat.

MartijnR commented 6 years ago

There is actually a way to show this bug in Enketo Core without engine modifications.