avniproject / apfodishanutrition

GNU Affero General Public License v3.0
0 stars 0 forks source link

[APF Odisha Phase-2] QA of Sync attributes & strategies #291

Closed nupoorkhandelwal closed 6 days ago

nupoorkhandelwal commented 3 weeks ago
Dinesh2019 commented 1 week ago

For QA references (query used to test the sync attributes ) :

select users.name, groups.name from public.users join user_group ug on users.id = ug.user_id join groups on ug.group_id = groups.id where groups.name = 'QRT users' and ug.is_voided is false and not ( ((users.sync_settings ->> 'subjectTypeSyncSettings')::jsonb -> 0 ->> 'syncConcept1' = 'be0ab05f-b0f3-43ec-b598-fdde0679104a' AND ((users.sync_settings ->> 'subjectTypeSyncSettings')::jsonb -> 0 -> 'syncConcept1Values')::jsonb ?& array ['8ebbf088-f292-483e-9084-7de919ce67b7']) OR ((users.sync_settings ->> 'subjectTypeSyncSettings')::jsonb -> 0 ->> 'syncConcept2' = 'be0ab05f-b0f3-43ec-b598-fdde0679104a' AND ((users.sync_settings ->> 'subjectTypeSyncSettings')::jsonb -> 0 -> 'syncConcept2Values')::jsonb ?& array ['8ebbf088-f292-483e-9084-7de919ce67b7']) );