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

[#793] Export Metadata Subfields Description And Additional Descriptions #823

Conversation

Meowcenary
Copy link
Collaborator

closes #793

@@ -88,6 +88,8 @@ def invenio_metadata(gf)
"creators": creators(gf.creator),
"title": gf.title.first,
"additional_titles": gf.title.last(gf.title.size-1).map{ |title| {"title": title, "type": "alternative_title", "lang": "eng"} },
"description": gf.description.first,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm a bit frustrated. The last time I looked at this I misunderstood how it was storing descriptions based on what I was reading back to CSV. I took it again today with file ids included to try and help understand the data better and realized it was storing descriptions as an array. I guess it work out in the end /shrug.

@@ -88,6 +88,8 @@ def invenio_metadata(gf)
"creators": creators(gf.creator),
"title": gf.title.first,
"additional_titles": gf.title.last(gf.title.size-1).map{ |title| {"title": title, "type": "alternative_title", "lang": "eng"} },
"description": gf.description.first,
"additional_descriptions": gf.description.last(gf.description.size-1).map{ |add_desc| {"description": add_desc, "type": "other", "lang": "eng"} },
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think leaving it as "other" to begin with will be fine. It's seemingly a required field so we need to put something, but really this will need to be looked over by a librarian I think.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is an odd one, the way descriptions are stored. Anyway, what if there is only one description stored? Will this break?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll check, but I think that ["entry"].last(0) returns [] which is then [].map{} which again returns []

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry, forgot to reply. What I said above is the case.

@Meowcenary
Copy link
Collaborator Author

Small and to the point.

Copy link
Collaborator

@sharpattack sharpattack left a comment

Choose a reason for hiding this comment

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

Thanks for double checking what happens when there is one description. Small and to the point.

@Meowcenary Meowcenary merged commit a7d71dd into master Feb 4, 2021
Copy link
Collaborator

@carsonicator carsonicator left a comment

Choose a reason for hiding this comment

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

Thanks @Meowcenary

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.

Export Metadata Subfields Description And Additional Descriptions
3 participants