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

Data cleaning report generates gaps on deleted iterations #3382

Closed
iperdomo opened this issue Jan 7, 2020 · 4 comments
Closed

Data cleaning report generates gaps on deleted iterations #3382

iperdomo opened this issue Jan 7, 2020 · 4 comments
Assignees
Labels
Bug Mark which issues are related to bugs GAE

Comments

@iperdomo
Copy link
Contributor

iperdomo commented Jan 7, 2020

When a user deletes an iteration of a repeatable question group, the DATA CLEANING report generates gaps in between. Example:

2020-01-07_973x315_scrot

In the example the iteration=0 for form instance 579789116 and iteration=1 for instance 573639119 were deleted, but the sheet created for the repeatable question group (Group 3) contains gaps.

Sample dataset:

  • Instance: UAT1
  • Form Id: 571789118
@iperdomo iperdomo added GAE Bug Mark which issues are related to bugs labels Jan 7, 2020
@stellanl
Copy link
Contributor

stellanl commented Jan 7, 2020

Found this TODO in org.waterforpeople.mapping.dataexport.InstanceData.InstanceData(SurveyInstanceDto, Map<Long, Map<Long, String>>):

        // Need to normalize the response map and add empty answers for missing iterations
        // as well as make sure that the iterations are sorted
        // TODO: Drop iterations with all empty answers (?).

So the "?" just became a "!"

We could renumber the iterations to have no index gaps. However, that should probably be done on data ingestion, not as part of report generation, as then the index will not match when importing after data cleaning.

@iperdomo
Copy link
Contributor Author

iperdomo commented Jan 7, 2020

We could renumber the iterations to have no index gaps. However, that should probably be done on data ingestion, not as part of report generation, as then the index will not match when importing after data cleaning.

Yeah, let's not mess with re-indexing answers. We're working on not having gaps in the app - akvo/akvo-flow-mobile#1564

@iperdomo
Copy link
Contributor Author

I checked the same report on the most recent version of the deployed service. There are gaps in the indices, but not empty lines 👍
2020-02-26_941x270_scrot

@iperdomo
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Mark which issues are related to bugs GAE
Projects
None yet
Development

No branches or pull requests

2 participants