Vaccination Checklist not working properly
Closed this issue · 3 comments
Describe the bug
"dependentOn" flag not working properly.
To Reproduce
Steps to reproduce the behaviour:
- Go to ck_uat vaccination checklist
- search Albendazole 3 and add
"dependentOn": "bf5d2cdb-0713-4005-8135-d757e8b68707",
- Sync in the mobile app
- The dependentOn added above is not respected when displaying the Vaccination Checklist.
Root cause:
- check in backend - dependentOn will be not be updated.
select * from checklist_item_detail where uuid = 'ea4a2663-4a1f-4a59-b76e-c996a49a35af';
- It shows in web-app but if you try to shit + command + r , again it remove dependentOn.
If we are updating via backend :
- add dependentOn via backend
UPDATE public.checklist_item_detail SET dependent_on = 1166, last_modified_date_time = now() WHERE id = 1173;
- check the updated value.
- go to web-app form
- do some change ex change minDaysFromStartDate and save.
- again check it removes dependentOn.
Also check is_voided also working weirdly.
Analysis:
Try to follow the same steps above to reproduce the issue since the issue doesn't occur always.
Expected behaviour
- Vaccination checklist should work properly.
- Check everything thoroughly
Test Data
card
@vedfordev dependentOn
for 'Albendazole 3' is getting saved correctly if 'Albendazole 2' is present in the json before 'Albendazole 3'. Just mentioning so you are not blocked and have a workaround. Continuing to look at this issue to see if further fix is required.
@1t5j0y Done with the changes. currently it is working fine but it randomly set the order.
@vedfordev We've put in a fix as part of this card to make the order of items in the JSON irrelevant.