Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CSV upload of registeration when individual's lowest address level is not the lowest location type #1225

Closed
Tracked by #1597
sachsk opened this issue May 9, 2024 · 7 comments
Assignees

Comments

@sachsk
Copy link
Member

sachsk commented May 9, 2024

Need:

Need to upload around 500 individuals via CSV, but unable to because of the below issue.

Steps to reproduce the issue:

org: CINI_uat
data:
CInI Data Upload - Copy of Avni_anganwadi sheet.csv

Got the error Missing 'Cluster' on uploading the file.
Its because, the above implementation has 4 address_level_types, State -> District -> Block -> Cluster, with Cluster as the lowest location type but the subject is resgistered at Block level.

AC:

  • Should be able to register even if the address level of the subject type is not the lowest one, based on the address level defined for the subject type
  • If there are multiple address levels defined at subject type level, first check the lowest among them if present for usage, then the others based on order of lowest type to higher.

Analysis notes:

Usecases for supporting multiple address levels for a subject to be registered at:

  • when collecting data for children, if the child is in school, then school is lowest address level, else village
  • different lowest address levels for urban and rural hierarchy for the same subject type
@sachsk sachsk added the bug Something isn't working label May 9, 2024
@mahalakshme mahalakshme removed the bug Something isn't working label May 9, 2024
@mahalakshme mahalakshme changed the title Unable to upload registration data if subjects "Lowest Address Levels" is at higher level Support CSV upload of registeration when individual lowest address level is not the lowest location type May 9, 2024
@mahalakshme mahalakshme changed the title Support CSV upload of registeration when individual lowest address level is not the lowest location type Support CSV upload of registeration when individual's lowest address level is not the lowest location type May 9, 2024
@petmongrels petmongrels self-assigned this May 13, 2024
@mahalakshme
Copy link
Contributor

@petmongrels updated the release of this card to 8.0.3

@petmongrels
Copy link
Contributor

Address Level Type matching

  • If subject type has registration locations configured then CSV upload will require one of these locations to be specified. A match between these and ones provided in CSV upload be done, giving precedence to lowest level to highest.
  • If subject type doesn't have registration locations configured then a match between all non-voided address level types and ones provided in CSV upload be done, giving precedence to lowest level to highest.

petmongrels added a commit to avniproject/rules-server that referenced this issue May 14, 2024
petmongrels added a commit to avniproject/rules-server that referenced this issue May 14, 2024
@petmongrels
Copy link
Contributor

petmongrels commented May 14, 2024

QA

  • Changes in Rule Server and Avni Server
  • Also check whether address related error messages are clear
  • Also test in organisation for which none of the subject types have set registration locations

petmongrels added a commit to avniproject/avni-server that referenced this issue May 14, 2024
…n class. Moved logic support registration location types to Subject Type. Changed some exceptions to RuntimeException.
@vinayvenu
Copy link
Member

getRegistrableLocationTypes(

If there is no setting on registration, don't we assume that we need to register at the lowest address level types possible?

@AchalaBelokar
Copy link

  • I tried to upload csv with deleting block it is showing me error cluster is missing.
    errors-Cini (3).csv

@AchalaBelokar
Copy link

@mahalakshme
Copy link
Contributor

@AchalaBelokar the above issue is fine, because thats a different one related to location hierarchy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

5 participants