ICTatRTI / coconut-mobile-plugin-zanzibar

Plugins added to Coconut Mobile for project specific features
Other
0 stars 0 forks source link

Case Notification marked complete is not handled as complete #16

Closed gmcressman closed 4 years ago

gmcressman commented 6 years ago

Newly installed democs app.

image image

gmcressman commented 6 years ago

Marking this case notification as complete also failed to generate a matching facility record. I have to demo this system tomorrow.

gmcressman commented 6 years ago

Yup. It's consistent. If I mark any record as Complete, it is not handled as complete. That should be easy to fix, but why is it broken?

scloo commented 6 years ago

There was significant changes in the code that modified the data property format when it is retrieved from the database. That was part of the reason why it broke the last time not being able to display the question in the question summary view. So I suspect that the current property format is missing the Complete attribute.

gmcressman commented 6 years ago

Can this be fixed quickly? We had a well-tested app. Now I can't trust it, and that's disappointing at this stage.

gmcressman commented 6 years ago

I should be clear that we need to do regression testing on the entire mobile app.

scloo commented 6 years ago

@mikeymckay Looks like the query is not returning the proper filtered result: Coconut.database.query "results", queryOptions (line 23 ResultCollection) It should return either results with Complete as true or Complete as false. When filtering for Complete as false, it is returning both (Complete as true AND Complete as false). And I cannot figure out why.

scloo commented 6 years ago

@mikeymckay There seems to be a discrepency in reference to the attribute "complete". In the case doc, the attribute is named as "complete" whereas in the QuestionView during the save process, the Form2js.form2js returns complete as "Complete" (capitalized). And I am assuming that the it is saved as "Complete". Hence in the caseSummaryData view it is retrieving as doc.complete, which always return as null. Comments?

scloo commented 6 years ago

Added a temporary hack to convert the attribute name from Complete to complete. This will resolve the current issue.

gmcressman commented 6 years ago

This problem has been fixed, but is that fix still a temporary hack? Does this code still need to be corrected in a better way?

scloo commented 6 years ago

Because it is dependent on another third party library, still to look at the codes and see if the issue could be eliminated fully.

gmcressman commented 6 years ago

This is working now, but I would like @mikeymckay to look at the comments from @scloo above. Is this issue fixed in the most appropriate way?