Enforce non-repeatable fields in submission forms#4274
Enforce non-repeatable fields in submission forms#4274Atmire-Kristof wants to merge 12 commits intoDSpace:mainfrom
Conversation
…forms-7.6' into w2p-129946_enforce-non-repeatable-fields-in-submission-forms-main
…forms-7.6' into w2p-129946_enforce-non-repeatable-fields-in-submission-forms-main
d7f5c60 to
745be8c
Compare
745be8c to
91a019b
Compare
…forms-7.6' into w2p-129946_enforce-non-repeatable-fields-in-submission-forms-main
| */ | ||
| private inCurrentSubmissionScope(field: string): boolean { | ||
| if (isNotEmpty(this.sectionMetadata) && !this.sectionMetadata.includes(field)) { | ||
| return false; |
There was a problem hiding this comment.
@Atmire-Kristof @alexandrevryghem apparently this change causes a regression for #1671 / #2252
For submission fields without a <linked-metadata-field> the Relationship list under the field is no longer updated on select/delete. You can see this in the Person form Publication field or by unlinking the Publication form author field from dc.contributor.author.
Can you find a way to reconcile both cases?
9fb4950 to
1589a05
Compare
|
Hi @Atmire-Kristof, |
|
On DSpace-CRIS this functionality has been already implemented. The result is the following
On REST side the changes are the same, on Angular part they are slightly different Could we consider a porting? |
|
Thanks @MMilosz for noting the overlap here with the existing DSpace-CRIS merger PR #5145. Closing this in favor of #5145 as the merger-related PRs take precedence. @Atmire-Kristof : Thank you for your contribution to DSpace. If we find that this is not solved by #5145 (and associated PRs), then I'd welcome you to reopen this at a future time. |

References
Description
This PR aims to display error messages when a form is submitted containing multiple values for a non-repeatable field.
Instructions for Reviewers
Requires REST side of PR (DSpace/DSpace#10679) in order for non-repeatable field errors to display.
List of changes in this PR:
CUSTOM_VALIDATORS, provided asDYNAMIC_VALIDATORSin the init-service.DynamicRowArrayModelin field-parser.inCurrentSubmissionScope(field: string)to exclude those fields.Steps to reproduce:
Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.