ICTatRTI / coconut-analytics

Browserified & backboned version of coconut-reports
Other
2 stars 3 forks source link

Shehia issue #332

Open scloo opened 6 years ago

scloo commented 6 years ago

Getting invalid error message for Shehia even though it is a valid name. Also have an 'undefined' error message popping up as shown in screenshot

scloo commented 6 years ago

Screenshot_2018-03-15-09-44-21.png Screenshot_2018-03-15-09-44-10.png

scloo commented 6 years ago

When starting the Household question, there are a couple of errors that popped up in the console. The same error popped up for Household Members question. Looks like it is due to these errors it was not able to validate properly, nor the list of Shehias is popping up.

Screen Shot 2018-03-15 at 11.12.17 AM.png

scloo commented 6 years ago

@mikeymckay, based on the recent change you made in the database when you set the required to true for Household Location, it cause the error in the console which eventually broke the Household question. Not sure ho to fix this as I am not familiar with how the HouseholdlocationSelectorView code works.

scloo commented 6 years ago

Strange though, I looked at the database and the 'required' is still set at 'false'. I recall that you told Humphrey that you have re-enable that to "required" status. I must be missing something somewhere.

scloo commented 6 years ago

Fixed the error that caused the Shehias validation to break. In the Zanzibar plugin HouseholdLocationSelectorView line 9: _(@targetLocationField.val()?.split(/,/)).each (location) =>

Added a ? after the val() to make sure it exist before proceeding to perform the split.

@mikeymckay Even though this helped to resolved the Shehias validation issue, I don't know whether this has any implication overall. If you have time, perhaps you can find out why the @targetLocationField.val() was undefined, after you made the last change that Humphrey requested to make the location input required. I could not figure out why.