dspace-angular
dspace-angular copied to clipboard
factory for eperson name not working
Describe the bug
The factory which returns the name for EPerson objects in the dso-name.service is currently not used.
To Reproduce This was tested with DSpace 7.6.1. We do not find any evidence that is has been solved in or 8.0 yet :)
Steps to reproduce the behavior:
- Change the name for some eperson in the name-service
https://github.com/DSpace/dspace-angular/blob/0a1764c65ad8cfd0a8e74776cee36073723681c4/src/app/core/breadcrumbs/dso-name.service.ts#L42
, e.g. print
${lastName} , ${firstName}with some comma inside or change the order - Rebuild the application in production setting (Error not not appear in dev mode) and start the application
- Call the eperson/epeople overview of users. No changes have been applied. Instead the default-behaviour using the deprecated
dso.namefunction is used.
Expected behavior We expect the factory to be called and the name being returned from this factory.
** Digging deeper into the code **
The behavior of the factory is currently not covered by some tests. Debugging lead that the choosen factory in the dso-name.service is determined by the dso.getRenderTypes() which is for the EPerson object https://github.com/DSpace/dspace-angular/blob/0a1764c65ad8cfd0a8e74776cee36073723681c4/src/app/core/eperson/models/eperson.model.ts#L94 the constructor name which is i.
Since the eperson does not appear to be shown in some listable component (only in the table in epeople-registry.component overview) we suggest that the renderType of the EPerson modal always return EPerson.
Related work
We can provide some solution for this issue and would like to work on it.
@floriangantner : I'm assigning you since you volunteered in the ticket description. Thanks!