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

Feature/download data elements legend set relation #415

Merged

Conversation

xurxodev
Copy link

@xurxodev xurxodev commented Jul 3, 2020

📌 References

⚙️ branches

   Origin: feature/download_data_elements_legend_set_relation Target: develop-uio

🎩 What is the goal?

The goal is to download and save in the database the relation between data elements and legends during the login process.

📝 How is it being implemented?

  • I have modified the database snapshot script to create a new DataElementsLegendsLink table, I have created a new script to migrated existed database and I have incremented version number in BaseDatabaseOpenHelper and DatabaseMigrationExecutor.
  • I have created DataElementLegendSetLink entity, DataElementLegendSetLinkTableInfo and DataElementLegendSetLinkStore and I have created corresponding tests.
  • I have created the infrastructure to download legends and DataElements relations:
    • I have added legendSets property to DataElement
    • I have added legendSets in DataElementFields
    • I have created a new dataElementLegendSetLinkHandler
    • I have created a new DataElementHandler that invokes to DataElementStore, legendSetHandler, dataElementLegendSetLinkHandler. I have created its corresponding tests.
    • I have created DataElementLegendSetChildrenAppender
    • I have added legendSets property to DataElement
  • I have added withLegends method in the DataElementCollectionRepository to retrieve legends of data elements from dhis2-android-capture-app

💥 How can it be tested?

Use case 1: - Execute the app to do login in a server with legends assigned to data elements then the DataElementLegendSetLink table should contain rows after the pull of metadata.

💾 Requires DB migration?

  • Nope, we can just merge this branch.
  • Yes, but we need to apply it before merging this branch.
  • Yes, it's already applied.

🎨 UI changes?

  • Nope, the UI remains as beautiful as it was before!
  • Yeap, here you have some screenshots-

…d_data_elements_legend_set_relation

# Conflicts:
#	core/src/main/assets/migrations/73.sql
#	core/src/main/assets/snapshots/72.sql
#	core/src/main/assets/snapshots/73.sql
#	core/src/main/assets/snapshots/75.sql
#	core/src/main/java/org/hisp/dhis/android/core/arch/db/access/internal/BaseDatabaseOpenHelper.java
#	core/src/main/java/org/hisp/dhis/android/core/arch/db/access/internal/DatabaseMigrationExecutor.java
@xurxodev xurxodev changed the base branch from develop-uio to feature/bring_1_1_2_from_upstream July 3, 2020 10:02
Base automatically changed from feature/bring_1_1_2_from_upstream to develop-uio July 7, 2020 06:20
Copy link
Member

@ifoche ifoche left a comment

Choose a reason for hiding this comment

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

thanks @xurxodev

@ifoche ifoche merged commit a15c6a8 into develop-uio Jul 17, 2020
@ifoche ifoche deleted the feature/download_data_elements_legend_set_relation branch July 17, 2020 14:37
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.

None yet

2 participants