-
Notifications
You must be signed in to change notification settings - Fork 9
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
Clarify handling of true/false values for User > addresses > primaryAddress #265
Comments
First, I double-checked what FOLIO expects (bugfest-lotus): Then, I verified what json.loads() and json.dumps() does: Then, I wrote a test to check that maps with True values in them, are mapped correctly: Then, I wrote the same test, but parsing a json string instead of using a Python dictionary, making sure that the json parsing does not interfere: Then, I updated the user map in the example repo template: Then, I ran the example against bugfest, verifying that the mapping propagated: Then, I posted the user to bugfest-Lotus (https://bugfest-lotus.int.aws.folio.org/users/preview/acf72e76-1a31-4301-a681-66bdddadedf3?query=%20kuragin&sort=name) Since the behaviour works as expected, I checked the string representations as well: |
It would be great with some examples and data to try to mimic the behaviour you are experiencing. |
Updated example in repo template: FOLIO-FSE/migration_repo_template@87c37a6 |
@branchedelac can we close this issue? Or do we need better clarifications? |
@branchedelac , a reminder. Can we close this one? |
@fontanka16 Have we (you) done something in the code/documentation/mapping file creator to make it clearer? |
@branchedelac see the above linked commits and updated examples in migration_repo_template. |
@fontanka16 I understand were not able to reproduce the following issues:
nor
The above two were what led me to believe that quoted lowercase was the only option that worked, and thus what we need to have as an example in the the migration repo user mapping file to help our colleagues map correctly. @bltravis and I ran into this with Wellesley's users, I will see if I can find some example data/mapping file to verify. |
I verified with he data migration repo template, and am seeing the (expected) behaviour that @fontanka16 describes also for lowercase unquoted true/false. If nothing has changed in the code since we ran into this back in May -- except that thing I added to make sure there is always (at least) one primary address -- I am not sure what the issue might have been for Wellesley. This is what I saw in May:
So I think we can close this. Thank you for writing the tests, Theodor. |
Current behaviour seems to be that lowercase true/false without quotes is translated to "", uppercase "True"/"False" with quotes as True. Uppercase True/False without quotes is not valid json.
Lowercase "true"/"false" seems to work: it becomes to true/"false", which FOLIO translates to true/false.
The text was updated successfully, but these errors were encountered: