ICTatRTI / coconut-mobile-plugin-zanzibar

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

Completing case notification fails to generate matching incomplete facility record #18

Closed gmcressman closed 6 years ago

gmcressman commented 6 years ago

Tested with democs. Same with Facility => Household => Household => Household member.

This code was working and tested before. What the heck broke it?

scloo commented 6 years ago

This is strange. I went through the codes and could not find the part that auto create the next stage question. I remember it was working before. I must have missed something in the codes. Even looked at the past codes in the git log.

scloo commented 6 years ago

@mikeymckay I checked the democs DB (and Zanzibar) within the question doc. Seems like the attributes "action_on_questions_loaded" and "onValidatedComplete" have been removed. I cannot remember the reason behind this. Because of the missing scripts, the next stage question was not created automatically because they are being referenced in the codes (QuestionView lines 469-476)

if allQuestionsPassValidation if @model.get("action_on_questions_loaded")? and @model.get("action_on_questions_loaded") isnt "" CoffeeScript.eval @model.get "action_on_questionsloaded" onValidatedComplete = @model.get("onValidatedComplete") if onValidatedComplete .delay -> CoffeeScript.eval onValidatedComplete ,1000

Can you remember why those attributes were removed from the question docs?

mikeymckay commented 6 years ago

Ugh. Just a mistake I must have made after upgrading to the cleaner question structure (that removed the need to manage internal ids within a question). I can fix that.

gmcressman commented 6 years ago

Fixed.