Commit 10a4e27
Clarin9/Save submission immediately when a type/sponsor/author field changes (#1489)
* Clarin9/Save submission immediately when a type/sponsor/author field changes
In the DSpace 9 upgrade, the CLARIN section-form lost the logic that persisted
the submission as soon as a type-bind controlling field (e.g. dc.type) or a
sponsor/author autocomplete value was picked. In v7, selecting such a value in
a dropdown fired an immediate section save (verified live on dev-5: choosing a
resource type triggers a PATCH). In v9 nothing was saved until the whole
section lost focus, so the choice could be lost.
Restore the v7 behaviour in SubmissionSectionFormComponent.onChange: when the
changed field is a type-bind controlling field or the sponsor/author field,
dispatch a section save immediately.
The set of type-bind controlling fields is owned by FormBuilderService in v9
(populated from `submit.type-bind.field`), so expose it via a new
getTypeFieldValues() accessor rather than duplicating the map in the component.
Form reconfiguration on type change is already handled reactively by v9's
type-bind machinery, so only the save is restored here.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Fix type-bind match to handle multi-segment controlling fields
Convert metadata to underscore notation instead of replacing only the
first underscore in the field id (addresses Copilot review).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent f78da0e commit 10a4e27
4 files changed
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
711 | 716 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
611 | 641 | | |
612 | 642 | | |
613 | 643 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
446 | 448 | | |
447 | 449 | | |
448 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
449 | 458 | | |
450 | 459 | | |
451 | 460 | | |
| |||
0 commit comments