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

Overwrite match only checks first data that matches the value #573

Open
anthonymarkQA opened this issue Sep 6, 2024 · 10 comments · May be fixed by #643
Open

Overwrite match only checks first data that matches the value #573

anthonymarkQA opened this issue Sep 6, 2024 · 10 comments · May be fixed by #643
Assignees
Labels
bug Something isn't working

Comments

@anthonymarkQA
Copy link

anthonymarkQA commented Sep 6, 2024

Describe the bug
Import match only checks the first data that it can find a match with. resulting to inconsistent data

To Reproduce

  1. Login to sp-mis as admin
  2. Go to Registry>configuration>Import match
  3. Toggle on overwrite match
  4. Use Contact for model field then use Name for field value
  5. Import a record with name already existing in registry (make sure this already existing name is duplicated in registry 2 or more)

Expected behavior
Module affected: spp_import_match
Context: Import match originally was used to match with unique values that is customer specific instead of using external IDs.

Import match therefore must update only unique from the registry upon import, if a duplicate is detected:

  • it should raise an error upon clicking "test" during import process|
  • it should raise an error upon clicking "import" during import process| and prevent import

In import match configuration. also hide the columns Match and Model

Screenshots

Additional context

🔔 Note: This ticket should address common considerations without including country-specific content. Please ensure all references are generic and applicable across various contexts.

@reichie020212
Copy link
Member

Estimate Dev Time

Optimistic: 8 hours
Pessimistic: 24 hours

@celinenilla
Copy link

@singhkaranvir25 , can you please analyze what the actual expected behaviour should be for this ticket?

@anthonymarkQA
Copy link
Author

anthonymarkQA commented Oct 17, 2024

Action points:
Module affected: spp_import_match
Context: Import match originally was used to match with unique values that is customer specific instead of using external IDs.

Import match therefore must update only unique from the registry upon import, if a duplicate is detected:

  • it should raise an error upon clicking "test" during import process|
  • it should raise an error upon clicking "import" during import process| and prevent import

in import match configuration. also hide the columns Match and Model
image

cc: @singhkaranvir25 @celinenilla @emjay0921

@emjay0921 emjay0921 self-assigned this Oct 23, 2024
@emjay0921 emjay0921 linked a pull request Oct 24, 2024 that will close this issue
@emjay0921 emjay0921 linked a pull request Oct 24, 2024 that will close this issue
@anjclarise
Copy link

anjclarise commented Nov 7, 2024

Verified this ticket and seems to be not working as expected for individuals import with matching names. @emjay0921 cc: @celinenilla

Test Steps:

  1. Install or Upgrade spp_import_match
  2. Create an import match configuration for Contact (Registry > Configuration > Import Match)
  3. Check overwrite match, and Add name in Fields.
  4. Try importing with at least 2 existing duplicated name in Groups or Individuals.
  5. If error was raised this PR is done.

Refer to screenshot below:
Import match config page:
Image

Group Import for multiple name match:
Image

Current list individuals list
Image

No error on individuals import page: (used data - test anj)
Image

Data was imported successfully and the bank account number was added after the import:
Image

@anthonymarkQA
Copy link
Author

Hi @anjclarise , i have tried it in individuals page and it seemed to work and gave an error message if it has multiple matches found in the registry>individuals page

kindly try importing this file in the same runboat instance you used

Contact (res.partner) - 2024-11-07T141221.723.xlsx

@anjclarise
Copy link

anjclarise commented Nov 7, 2024

Update: @anthonymarkQA and I tried the file from above, I get an error when I import the same file but when I used the same file and update the name field to an existing individual " ANJ, TEST" I didn't get an error.

Image

We suspect that this could be because I edit the file using googlesheet >> download the file as .xlsx format >> then import to openspp in the individual page. Unlike @anthonymarkQA who uses libre office

cc: @celinenilla @emjay0921

@emjay0921
Copy link
Contributor

I'll check this one.

@emjay0921
Copy link
Contributor

@anjclarise can you upload here a video screen recording of the issue? Also upload here the excel or csv files you used. Thank you.

@emjay0921
Copy link
Contributor

@kneckinator , @reichie020212 , @gonzalesedwin1123 , @celinenilla , @anjclarise

Found the issue of this when using name field for import match on Individual, so the problem is the name_change function in g2p_registry_individual is adding a whitespace or a blank space after the given_name. So Import Match can't search it properly as it is case sensitive.

e.g.
Family Name: "Dela Cruz"
Given Name: "Juan"

Output of Name field is: "DELA CRUZ, JUAN " (notice the space, also this is automatically converted to Uppercase)

So new PR: OpenSPP/openg2p-registry#4 in g2p_registry forked repository to fix this, on which it will retain making it in Uppercase but not adding a blank space.

Please review @reichie020212 , @kneckinator , @gonzalesedwin1123 .

@kneckinator
Copy link
Contributor

@celinenilla should this also be released as a fix on top of Batanes (17.0.1.2.1), or do we only put this in 17.0.1.3.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants