avaliabrasil/avalia-brasil

Android App sends two evaluations together to the same Place incorrectly

pedroliman opened this issue · 2 comments

Apparently, if one leaves a form uncompleted, and evaluates other place, the api sends both responses as a response to the second place.

The app sent this:
{"userId":"1","newPlace":true,"placeTypeId":"106","address":"Loja B, Estrada da Posse, 1903 - Santíssimo","name":"Farmácia Droga Adrison","cityName":"Rio de Janeiro","stateLetter":"RJ","answers":[{"questionId":"1","questionType":"likert","answer":"4"},{"questionId":"2","questionType":"likert","answer":"3"},{"questionId":"3","questionType":"likert","answer":"3"},{"questionId":"4","questionType":"likert","answer":"3"},{"questionId":"5","questionType":"likert","answer":"4"},{"questionId":"6","questionType":"likert","answer":"2"},{"questionId":"7","questionType":"likert","answer":"5"},{"questionId":"8","questionType":"likert","answer":"1"},{"questionId":"9","questionType":"likert","answer":"2"},{"questionId":"10","questionType":"likert","answer":"3"},{"questionId":"11","questionType":"likert","answer":"4"},{"questionId":"12","questionType":"likert","answer":"2"},{"questionId":"13","questionType":"likert","answer":"3"},{"questionId":"14","questionType":"likert","answer":"4"},{"questionId":"15","questionType":"likert","answer":"3"},{"questionId":"16","questionType":"likert","answer":"2"},{"questionId":"17","questionType":"likert","answer":"3"},{"questionId":"18","questionType":"likert","answer":"4"},{"questionId":"19","questionType":"likert","answer":"2"},{"questionId":"20","questionType":"likert","answer":"3"},{"questionId":"21","questionType":"likert","answer":"4"},{"questionId":"22","questionType":"likert","answer":"5"},{"questionId":"23","questionType":"comment","answer":"ok"},{"questionId":"1","questionType":"likert","answer":"3"},{"questionId":"2","questionType":"likert","answer":"4"},{"questionId":"3","questionType":"likert","answer":"5"},{"questionId":"4","questionType":"likert","answer":"2"},{"questionId":"5","questionType":"likert","answer":"4"},{"questionId":"6","questionType":"likert","answer":"3"},{"questionId":"7","questionType":"likert","answer":"2"},{"questionId":"8","questionType":"likert","answer":"4"},{"questionId":"9","questionType":"likert","answer":"2"},{"questionId":"10","questionType":"likert","answer":"4"},{"questionId":"1","questionType":"likert","answer":"4"},{"questionId":"2","questionType":"likert","answer":"2"},{"questionId":"3","questionType":"likert","answer":"5"},{"questionId":"4","questionType":"likert","answer":"2"},{"questionId":"5","questionType":"likert","answer":"4"},{"questionId":"6","questionType":"likert","answer":"5"},{"questionId":"7","questionType":"likert","answer":"2"},{"questionId":"8","questionType":"likert","answer":"4"},{"questionId":"9","questionType":"likert","answer":"3"},{"questionId":"10","questionType":"likert","answer":"2"},{"questionId":"11","questionType":"likert","answer":"5"},{"questionId":"12","questionType":"likert","answer":"2"},{"questionId":"13","questionType":"likert","answer":"3"},{"questionId":"14","questionType":"likert","answer":"5"},{"questionId":"15","questionType":"likert","answer":"4"},{"questionId":"16","questionType":"likert","answer":"3"},{"questionId":"17","questionType":"likert","answer":"5"},{"questionId":"18","questionType":"likert","answer":"1"},{"questionId":"19","questionType":"likert","answer":"1"},{"questionId":"20","questionType":"likert","answer":"1"},{"questionId":"21","questionType":"likert","answer":"1"},{"questionId":"22","questionType":"likert","answer":"1"},{"questionId":"23","questionType":"comment","answer":"bom"}]}

When I looked at the comments, I saw two of them!! And they were not the same!

screenshot_1476472306 custom

Checking the database I found that there were other duplicate comments too:
image

I'm not shure whether this is just an android bug, or it involves the api somehow.

{"userId":"1","newPlace":true,"placeTypeId":"108","address":"Estrada Vítor Dumas, 406 - Santa Cruz, Rio de Janeiro","name":"Colégio Estadual Professor Ozeas Gomes Laranjeira","cityName":"Rio de Janeiro","stateLetter":"RJ","answers":[{"questionId":"1","questionType":"likert","answer":"4"},{"questionId":"2","questionType":"likert","answer":"3"},{"questionId":"3","questionType":"likert","answer":"3"},{"questionId":"4","questionType":"likert","answer":"3"},{"questionId":"5","questionType":"likert","answer":"4"},{"questionId":"6","questionType":"likert","answer":"2"},{"questionId":"7","questionType":"likert","answer":"5"},{"questionId":"8","questionType":"likert","answer":"1"},{"questionId":"9","questionType":"likert","answer":"2"},{"questionId":"10","questionType":"likert","answer":"3"},{"questionId":"11","questionType":"likert","answer":"4"},{"questionId":"12","questionType":"likert","answer":"2"},{"questionId":"13","questionType":"likert","answer":"3"},{"questionId":"14","questionType":"likert","answer":"4"},{"questionId":"15","questionType":"likert","answer":"3"},{"questionId":"16","questionType":"likert","answer":"2"},{"questionId":"17","questionType":"likert","answer":"3"},{"questionId":"18","questionType":"likert","answer":"4"},{"questionId":"19","questionType":"likert","answer":"2"},{"questionId":"20","questionType":"likert","answer":"3"},{"questionId":"21","questionType":"likert","answer":"4"},{"questionId":"22","questionType":"likert","answer":"5"},{"questionId":"23","questionType":"comment","answer":"ok"},{"questionId":"1","questionType":"likert","answer":"3"},{"questionId":"2","questionType":"likert","answer":"4"},{"questionId":"3","questionType":"likert","answer":"5"},{"questionId":"4","questionType":"likert","answer":"2"},{"questionId":"5","questionType":"likert","answer":"4"},{"questionId":"6","questionType":"likert","answer":"3"},{"questionId":"7","questionType":"likert","answer":"2"},{"questionId":"8","questionType":"likert","answer":"4"},{"questionId":"9","questionType":"likert","answer":"2"},{"questionId":"10","questionType":"likert","answer":"4"},{"questionId":"1","questionType":"likert","answer":"4"},{"questionId":"2","questionType":"likert","answer":"2"},{"questionId":"3","questionType":"likert","answer":"5"},{"questionId":"4","questionType":"likert","answer":"2"},{"questionId":"5","questionType":"likert","answer":"4"},{"questionId":"6","questionType":"likert","answer":"5"},{"questionId":"7","questionType":"likert","answer":"2"},{"questionId":"8","questionType":"likert","answer":"4"},{"questionId":"9","questionType":"likert","answer":"3"},{"questionId":"10","questionType":"likert","answer":"2"},{"questionId":"11","questionType":"likert","answer":"5"},{"questionId":"12","questionType":"likert","answer":"2"},{"questionId":"13","questionType":"likert","answer":"3"},{"questionId":"14","questionType":"likert","answer":"5"},{"questionId":"15","questionType":"likert","answer":"4"},{"questionId":"16","questionType":"likert","answer":"3"},{"questionId":"17","questionType":"likert","answer":"5"},{"questionId":"18","questionType":"likert","answer":"1"},{"questionId":"19","questionType":"likert","answer":"1"},{"questionId":"20","questionType":"likert","answer":"1"},{"questionId":"21","questionType":"likert","answer":"1"},{"questionId":"22","questionType":"likert","answer":"1"},{"questionId":"23","questionType":"comment","answer":"bom"},{"questionId":"1","questionType":"likert","answer":"4"},{"questionId":"2","questionType":"likert","answer":"2"},{"questionId":"3","questionType":"likert","answer":"4"},{"questionId":"4","questionType":"likert","answer":"5"},{"questionId":"5","questionType":"likert","answer":"3"},{"questionId":"6","questionType":"likert","answer":"2"},{"questionId":"7","questionType":"likert","answer":"3"},{"questionId":"8","questionType":"likert","answer":"4"},{"questionId":"9","questionType":"likert","answer":"5"},{"questionId":"10","questionType":"likert","answer":"2"},{"questionId":"11","questionType":"likert","answer":"3"},{"questionId":"12","que

That is reaally wrong. I did only respond once to this place, and it has now three comments. The android app is acumulating the responses.
screenshot_1476473196 custom

Tested, passing!