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

Revert to have data exports default sorting by id #2474

Merged
merged 8 commits into from
Sep 13, 2023

Conversation

kelvin-muchiri
Copy link
Contributor

@kelvin-muchiri kelvin-muchiri commented Sep 12, 2023

Changes / Features implemented

  • Revert to have data exports default sorting by id. Default ordering by id was removed as part of the changes made on PR Enhance performance when exporting data on endpoint api/v1/data/<form_id>.<format> #2460. This is affecting the index column hence record matching is a problem when exporting data in repeat groups.
  • Fix bug sorting is not applied when fetching data on select columns that are not json fields
  • Fix bug argument 3: TypeError: wrong type raised when using including GIS fields in Manager.raw when exporting non-OSM data by avoid SELECT * and selecting only the fields of interest

Steps taken to verify this change does what is intended

  • QA

Side effects of implementing this change

Default ordering on endpoint api/v1/data/<form_id>.<format> by id ascending order is restored

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

Closes #

when fields are provided in the query no ordering is applied
sorting when fetching data is not applied when fetching data on select columns that are not json fields
Unexpected keyword argument 'json_only' in function call
get rid of ctypes.ArgumentError: error raised when working with GIS fields with Manager.raw() by selecting only the columns we need
Copy link
Member

@FrankApiyo FrankApiyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@kelvin-muchiri kelvin-muchiri merged commit 170c8ca into main Sep 13, 2023
10 checks passed
@kelvin-muchiri kelvin-muchiri deleted the revert-data-order-by branch September 13, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants