-
Notifications
You must be signed in to change notification settings - Fork 490
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
8868 fix json import #8927
8868 fix json import #8927
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great/non-controversial, but could you please add a 1-line release note saying that this requires a re-export. So that we don't forget to include it into the 5.12 release instructions.
|
||
Run ReExportall to update Exports | ||
|
||
Following the directions in the [Admin Guide](http://guides.dataverse.org/en/5.12/admin/metadataexport.html#batch-exports-through-the-api) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@landreev, I added a quick release note. Please feel free to edit as you wish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to take you up on that "feel free" - adding a mention of the duplicate keyword in the DDI under bugfixes in the note, per Jim's suggestion. (I want to merge this PR tonight!)
@sekmiller @qqmyers
In this branch:
I can't see immediately how the changes in the branch would result in this. (?) |
Two guesses: I think the design is for the keywords to show in the platform default lang, and, if different, the metaata lang as well. So two possibilities - one machine used for testing has a non-english language (i.e. C.utf8 can be the default instead) so it creates english and a default, or possibility 2: the metadatalang=default in the json, which is used as the starting point for the DDI export was tricking the code into adding the second entry somehow. Looking at the code, my guess would be the former, i.e. that the machine locale is not english. (I've seen this on Ubuntu, not sure what else does it by default). i.e. !defaultLocale.getLanguage().equals(the metadatalanguage for the dataset) at
Not sure though... |
Both branches were tested on the same system (my dev. box), on the same dataset (by deleting the cached export, asking for ddi again). Tested develop -> switched to branch -> switched back to develop - the behavior is consistent as described above. (will switch back to the branch one more time). |
(the locale jumping between different settings between redeployments, unrelated to what's in the branch - not entirely impossible) |
@qqmyers It is in fact the result our DDI being produced from our json. |
Improvement or not, if we're going with this change, please document it in the release note snippet. |
Actually, no, I'm not sure this needs to be documented. I don't think the "old" behavior was ever documented, or intentional. To me it looks like it was only there since 5.11, and, again, as the result of that |
Let me pull the fix for the harvesting test from develop, which will run the integration test... |
"terminated abnormally", hmm. |
re:improvement - yes, I think this is just part of the bug fix - when the no metadatalanguage value changed from null to undefined, it made it get exported and caused an extra keyword line in the DDI. Fixing that fixes the exports in general and the extra keyword lines that we presumably didn't notice. So - if there's any release text change, I'd suggest something about it fixing a ~duplicate keyword tag in the ddi export. |
OK, sure, makes sense to mention it under "bug fixes". And we are already recommending a reexport. |
…under "bugfixes" (#8868)
@pdurbin You were right - makes sense to document, as a bug fix. |
Oh my, the last Jenkins run must have gotten caught by the 7pm auto-kill again. This PR just can't catch a break! |
What this PR does / why we need it: this PR makes sure that the json export of a dataset does not include metadataLanguage if it is undefined
Which issue(s) this PR closes:
Closes #8868 dataverse_json with "metadataLanguage":"undefined" cannot be imported
Special notes for your reviewer:
I moved the test for isMetadataLanguageSet to the DVObjectContainer so that it may be used in other situations where similar code was in place.
Suggestions on how to test this:
make sure that a dataset exported where the metadataLanguage is undefined may be imported.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No
Is there a release notes update needed for this change?:
Included to remind users to Re-export all to effect this change.
Additional documentation:
None