new project metadata representation component#2277
Conversation
|
@paulo-graca The code looks sensible, but I don't seem to be able to reproduce the issue in the first place. If I create a relationship to a Project in the submission it already has a proper name: <row>
<relation-field>
<relationship-type>isProjectOfPublication</relationship-type>
<search-configuration>project</search-configuration>
<label>Project</label>
<hint>import a project</hint>
</relation-field>
</row>Perhaps you can send me the exact submission config I need to reproduce the issue? |
|
Thank you @artlowel for your feedback. I will try to gather more data. |
|
@artlowel I'm using With the field specification: and the relationship type definition has the following: This is what is happening: |
artlowel
left a comment
There was a problem hiding this comment.
Thanks @paulo-graca!
The key was to use the openaire4 virtual metadata mapping. If I use that, I can reproduce the issue.
However your fix doesn't work for me in all cases, because you've created a new component with a decorator specific to dspace (i.e. @metadataRepresentationComponent). You need to add that component to the ENTRY_COMPONENTS array of its module. That way angular will know it exists and process that decorator when the app starts. Otherwise you just have to be lucky that it's already been processed by the time you need it
...-entities/metadata-representations/project/project-item-metadata-list-element.component.html
Outdated
Show resolved
Hide resolved
...-entities/metadata-representations/project/project-item-metadata-list-element.component.html
Outdated
Show resolved
Hide resolved
|
Thank you @artlowel for your feedback, I will address it soon as possible! |
|
@artlowel I've just addressed your feedback. It's working for me. I will just address the remaining styling issues. |
artlowel
left a comment
There was a problem hiding this comment.
Thanks @paulo-graca!
The changes look good, but the tests fail at the moment.
Looks like you still need to provide DSONameService in project-item-metadata-list-element.component.spec.ts
Meaning, add something like this to the beforeEach:
dsoNameService = jasmine.createSpyObj({
getName: projectTitle
});And then add that mock service to the providers list of the testbed:
declarations: [ProjectItemMetadataListElementComponent],
providers: [
{ provide: DSONameService, useValue: dsoNameService }
],
schemas: [NO_ERRORS_SCHEMA]Once the tests are fixed, I'm a +1 for this PR
|
I don't have a test system setup on my remote host, I was trying to do that. But it will take me some time. |


References
Add references/links to any related issues or PRs. These may include:
Description
This PR adds a new component to address issue #2276.
Instructions for Reviewers
You will find that when trying to create a relationship from a Project to a Publication, the project label is shown on the submission form (the dc:title field)
