Conversation
|
I'm experiencing the same as in #475, where the ds-metadata-representation-list component doesn't behave as expected using my local backend. |
|
But, as in #475 , this is working as expected using the Atmire backend. As an example, the Person with the UUID: 0ffbee3f-e7ea-42bc-92fe-2fbef1a52c0f has this metadata: but the author name presented in the Publication with the UUID 72635f7f-37b5-4875-b4f2-5ff45d97a09b is "Eens, M." when, based on the default behavior ([person.familyName], [person.givenName] ) it should be: "Eens, Marcel". |
| import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator'; | ||
| import { MetadataRepresentationType } from '../../../../core/shared/metadata-representation/metadata-representation.model'; | ||
| import { TypedItemSearchResultListElementComponent } from '../../../../shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component'; | ||
| import { |
paulo-graca
left a comment
There was a problem hiding this comment.
Using Atmire's backend. This PR works as expected but I can't test it with my own backend. As I referred in #475 I think this might be related with some backend dependency I don't have in my local environment.
|
I have quickly tested this with the latest master REST and this branch in Angular, and I noticed dc.contributor.author contained the name variant and the authors section on the simple item page contained the name variant as well, without any errors |
tdonohue
left a comment
There was a problem hiding this comment.
Code looks fine to me. I haven't tested it, but trust the testing of others.
This PR adds support for name variants on related items by always using the virtual metadata’s value.
This is achieved by modifying ItemMetadataRepresentation to accept a MetadataValue in the constructor and return its value in the
getValue()method of the representation.This
getValue()method is then called on the entity-metadata-list-element components to display the name variant.A sample item is https://dspace7-entities.atmire.com/items/72635f7f-37b5-4875-b4f2-5ff45d97a09b