-
Notifications
You must be signed in to change notification settings - Fork 1
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
[#793] Export Metadata Subfields Description And Additional Descriptions #823
Conversation
@@ -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, |
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.
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"} }, |
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.
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.
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 is an odd one, the way descriptions are stored. Anyway, what if there is only one description stored? Will this break?
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.
I'll check, but I think that ["entry"].last(0)
returns []
which is then [].map{}
which again returns []
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.
Sorry, forgot to reply. What I said above is the case.
Small and to the point. |
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.
Thanks for double checking what happens when there is one description. Small and to the point.
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.
Thanks @Meowcenary
closes #793