Full item page of entities missing title/name#1839
Merged
tdonohue merged 6 commits intoDSpace:mainfrom Sep 23, 2022
Merged
Conversation
…, person.familyName, person.givenName or organization.legalName is used
Member
|
@alexandrevryghem : This now has minor merge conflicts. I suspect caused by our recent merger of #1780. Could you give it a rebase on the latest |
tdonohue
approved these changes
Sep 23, 2022
Member
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @alexandrevryghem ! I tested this today and it fixes the reported bug. I also tested each out-of-the-box entity type, and didn't find any issues with their title/name in search, browse, simple item page or full item page. So, this looks great to me!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Description
Use the
DSONameServicefor displaying all the title and name fields for items.Instructions for Reviewers
Verify for each entity and item with
dspace.entity.typethat it renders a valid title or a fallback if none can be found in following locations:List of entity types with corresponding expected title fields:
{person.familyName}, {person.givenName}(comma and space only rendering if both present)organization.legalNamedc.titleList of changes in this PR:
DSONameService: For the items of typePersonthe comma in the title${familyName}, ${givenName}is now only showed when both fields existDSONameService: When the factories returnednullorundefinedthegetNamewould still be empty now it will call theDefaultfactory when defined factory returns an empty valueItemPageTitleFieldComponentinstead of their oldh2titlesSearchResultListElementComponentnow all his use thedsoTitlefield instead of retrieving it from the metadata directlyItemSearchResultGridElementComponentnow all his use the newdsoTitlefield instead of retrieving it from the metadata directlyInclude guidance for how to test or review your PR.
dc.title,person.familyName,person.givenNameandorganization.legalNameand check if they can also use theDSONameService(normally they have all already been changed)Checklist
yarn run lintpackage.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.