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

Bulk import issues: mapping ID case sensitivity and update vs. create #935

Closed
paynejd opened this issue Aug 20, 2021 · 2 comments
Closed
Assignees
Labels
api2 OCL API v2 bug Something isn't working bulk-import This is specific to Bulk Import feature
Milestone

Comments

@paynejd
Copy link
Member

paynejd commented Aug 20, 2021

https://api.staging.openconceptlab.org/importers/bulk-import/?task=eca79204-335e-47ba-b936-bfcb86c021a7-datim-admin~DATIM-MOH-DEMO-DAA-FY21&result=json

Take a look at the above bulk import results. All of these are new resources, but it is showing up as 36 “updated” resources. There are 2 issues I’m seeing:

  1. New source versions are being added to the “updated” list instead of the “created” list
  2. There is one mapping that is getting updated because the ID comparison is case insensitive — see below. The from_concept_id and the mapping ID has either an upper-case or lower-case T, but only the upper-case resource was created: https://app.staging.openconceptlab.org/#/orgs/DATIM-MOH-DEMO-DAA-FY21/sources/DATIM-Alignment-Indicators/mappings/MAP-MOH-ADD-OPERATION-de-Test-2-null-disag/details/
        {
            "retired": false,
            "from_concept_url": "/orgs/DATIM-MOH-DEMO-DAA-FY21/sources/DATIM-Alignment-Indicators/concepts/de-Test-2/",
            "source": "DATIM-Alignment-Indicators",
            "owner": "DATIM-MOH-DEMO-DAA-FY21",
            "map_type": "ADD OPERATION",
            "owner_type": "Organization",
            "type": "Mapping",
            "id": "MAP-MOH-ADD-OPERATION-de-Test-2-null-disag",
            "to_concept_url": "/orgs/PEPFAR/sources/DATIM-MOH-DAA-FY21/concepts/null-disag/"
        },
        {
            "retired": false,
            "from_concept_url": "/orgs/DATIM-MOH-DEMO-DAA-FY21/sources/DATIM-Alignment-Indicators/concepts/de-test-2/",
            "source": "DATIM-Alignment-Indicators",
            "owner": "DATIM-MOH-DEMO-DAA-FY21",
            "map_type": "ADD OPERATION",
            "owner_type": "Organization",
            "type": "Mapping",
            "id": "MAP-MOH-ADD-OPERATION-de-test-2-null-disag",
            "to_concept_url": "/orgs/PEPFAR/sources/DATIM-MOH-DAA-FY21/concepts/null-disag/"
        },
@paynejd paynejd added the bug Something isn't working label Aug 20, 2021
@paynejd paynejd added this to the Sprint 17 milestone Aug 20, 2021
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 20, 2021
… version create to append results in created and not updated
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 20, 2021
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 20, 2021
…to consider id (mnemonic) attribute for exists check
@snyaggarwal
Copy link
Contributor

@paynejd fixed both the issues. Should be good in next deployment

@snyaggarwal snyaggarwal added api2 OCL API v2 bulk-import This is specific to Bulk Import feature labels Aug 20, 2021
@paynejd
Copy link
Member Author

paynejd commented Aug 20, 2021

Tested on staging and this is working great! Thank you @snyaggarwal!

@paynejd paynejd closed this as completed Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api2 OCL API v2 bug Something isn't working bulk-import This is specific to Bulk Import feature
Projects
None yet
Development

No branches or pull requests

2 participants