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
@github-project-automation github-project-automation bot moved this to New Issues in Avni Product May 9, 2024
@sachsk sachsk added the bug Something isn't working label May 9, 2024
@mahalakshme mahalakshme moved this from New Issues to In Analysis in Avni Product 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
@mahalakshme mahalakshme moved this from In Analysis to In Analysis Review in Avni Product May 10, 2024
@mahalakshme mahalakshme moved this from In Analysis Review to Ready in Avni Product May 10, 2024
@petmongrels petmongrels moved this from Ready to In Progress in Avni Product May 13, 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.
@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product May 14, 2024
@vinayvenu vinayvenu moved this from Code Review Ready to In Code Review in Avni Product May 15, 2024
@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?

@vinayvenu vinayvenu moved this from In Code Review to Code Review with Comments in Avni Product May 15, 2024
@petmongrels petmongrels moved this from Code Review with Comments to QA Ready in Avni Product May 15, 2024
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product May 15, 2024
@AchalaBelokar
Copy link

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

@AchalaBelokar AchalaBelokar moved this from In QA to Done in Avni Product May 16, 2024
@AchalaBelokar AchalaBelokar moved this from Done to In QA in Avni Product May 16, 2024
@AchalaBelokar AchalaBelokar moved this from In QA to Done in Avni Product May 17, 2024
@AchalaBelokar
Copy link

@mahalakshme
Copy link
Contributor

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

shraddha761 pushed a commit to shraddha761/avni-server that referenced this issue Jul 4, 2024
…n class. Moved logic support registration location types to Subject Type. Changed some exceptions to RuntimeException.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants