We ran into a very strange, and luckily once off, case where a household was somehow saved as a child of another household.
Households are a contact_type
on our side, which should only ever have a parent of the dwelling
contact type.
This has not changed since the day we deployed our project configuration in last year November.
It was found when a routine SQL report downstream kept producing unexpected results.
We’ve tried asking the affected CHW to take us through the steps that lead up to this entry’s creation, unfortunately they’re unable to recall.
So far we’ve been unable to replicate this behavior ourselves.
Does anyone here have any ideas of how this could happen?
Our hierarchy structure for reference:
{
"id": "npo",
"name_key": "contact.type.npo",
"group_key": "contact.type.npo.plural",
"create_key": "contact.type.npo.new",
"edit_key": "contact.type.place.edit",
"icon": "wcg-npo",
"create_form": "form:contact:npo:create",
"edit_form": "form:contact:npo:edit"
},
{
"id": "dho",
"name_key": "contact.type.dho",
"group_key": "contact.type.dho.plural",
"create_key": "contact.type.dho.new",
"edit_key": "contact.type.dho.edit",
"primary_contact_key": "contact.type.dho-primary",
"parents": [
"npo"
],
"icon": "wcg-dho",
"create_form": "form:contact:dho:create",
"edit_form": "form:contact:dho:edit",
"person": true
},
{
"id": "vap",
"name_key": "contact.type.vap",
"group_key": "contact.type.vap.plural",
"create_key": "contact.type.vap.new",
"edit_key": "contact.type.vap.edit",
"primary_contact_key": "contact.type.vap-primary",
"parents": [
"npo"
],
"icon": "wcg-vap",
"create_form": "form:contact:vap:create",
"edit_form": "form:contact:vap:edit",
"person": true
},
{
"id": "team_area",
"name_key": "contact.type.team_area",
"group_key": "contact.type.team_area.plural",
"create_key": "contact.type.team_area.new",
"edit_key": "contact.type.place.edit",
"parents": [
"npo"
],
"icon": "wcg-team_area",
"create_form": "form:contact:team_area:create",
"edit_form": "form:contact:team_area:edit"
},
{
"id": "team_lead",
"name_key": "contact.type.team_lead",
"group_key": "contact.type.team_lead.plural",
"create_key": "contact.type.team_lead.new",
"edit_key": "contact.type.team_lead.edit",
"primary_contact_key": "contact.type.team_lead-primary",
"parents": [
"team_area"
],
"icon": "wcg-team_lead",
"create_form": "form:contact:team_lead:create",
"edit_form": "form:contact:team_lead:edit",
"person": true
},
{
"id": "cca",
"name_key": "contact.type.cca",
"group_key": "contact.type.cca.plural",
"create_key": "contact.type.cca.new",
"edit_key": "contact.type.cca.edit",
"primary_contact_key": "contact.type.cca-primary",
"parents": [
"team_area"
],
"icon": "wcg-cca",
"create_form": "form:contact:cca:create",
"edit_form": "form:contact:cca:edit",
"person": true
},
{
"id": "indawo",
"name_key": "contact.type.indawo",
"group_key": "contact.type.indawo.plural",
"create_key": "contact.type.indawo.new",
"edit_key": "contact.type.place.edit",
"parents": [
"team_area"
],
"icon": "wcg-indawo",
"create_form": "form:contact:indawo:create",
"edit_form": "form:contact:indawo:edit"
},
{
"id": "super_chw",
"name_key": "contact.type.super_chw",
"group_key": "contact.type.super_chw.plural",
"create_key": "contact.type.super_chw.new",
"edit_key": "contact.type.super_chw.edit",
"primary_contact_key": "contact.type.super_chw-primary",
"parents": [
"indawo"
],
"icon": "icon-risk",
"create_form": "form:contact:super_chw:create",
"edit_form": "form:contact:super_chw:edit",
"person": true
},
{
"id": "chw",
"name_key": "contact.type.chw",
"group_key": "contact.type.chw.plural",
"create_key": "contact.type.chw.new",
"edit_key": "contact.type.chw.edit",
"primary_contact_key": "contact.type.chw-primary",
"parents": [
"indawo"
],
"icon": "wcg-chw",
"create_form": "form:contact:chw:create",
"edit_form": "form:contact:chw:edit",
"person": true
},
{
"id": "dwelling",
"name_key": "contact.type.dwelling",
"group_key": "contact.type.dwelling.plural",
"create_key": "contact.type.dwelling.new",
"edit_key": "contact.type.place.edit",
"parents": [
"indawo"
],
"icon": "wcg-dwelling",
"create_form": "form:contact:dwelling:create",
"edit_form": "form:contact:dwelling:edit"
},
{
"id": "household",
"name_key": "contact.type.household",
"group_key": "contact.type.household.plural",
"create_key": "contact.type.household.new",
"edit_key": "contact.type.household.edit",
"parents": [
"dwelling"
],
"icon": "wcg-household",
"create_form": "form:contact:household:create",
"edit_form": "form:contact:household:edit",
"count_visits": true
},
Our CHT version is currently still 4.3.x.