You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the author input configured as separate surname/firstname inputs, the item details page shows Hassan,Amad Ul instead of Hassan, Amad Ul — no space after the comma.
Root cause (verified in code) — it is a STORAGE bug; the display renders the stored value verbatim
The two-input widget is clarin-name, used only in clariahSubmissionsPageTwo (submission-forms.xml:1618) and teachingSubmissionsPageTwo (:1921) → DH Data and Teaching materials collections. The traditional form's author is a single autocomplete (:193).
src/app/shared/form/builder/ds-dynamic-form-ui/models/clarin-name.model.ts:41: the constructor overrides this.separator = ',' (no space) after super(), while the parent DynamicConcatModel (ds-dynamic-concat.model.ts:57) correctly does config.separator + ' '. get value() (59-60) then joins surname + ',' + firstname → Hassan,Amad Ul is what gets stored.
DI wiring bug (why simply deleting the override is NOT a fix):parser-factory.ts:27-33 defines fieldParserDeps as 5 positional deps ending with TranslateService, but ClarinNameFieldParser's 5th constructor parameter is separator: string (clarin-name-field-parser.ts:25-36) — so separator receives the TranslateService instance and translate is undefined. config.separator is therefore an object, and the hard-coded ',' in the model is the only functioning separator.
Production archived data is currently clean (a scan of 2363 author values found no ,\S match) — the reported value likely lives in an in-flight workspace/workflow item or another instance. Curation must therefore also cover workspace/workflow items; worth asking the reporter where they saw it.
Feedback loop: space-less values get indexed into Solr author_ac and come back as suggestions on the traditional form.
Reproduction (local docker stack)
Map a collection to clariahSubmissions/teachingSubmissions (fresh DB has no such handles — create + map; docker compose uses a prebuilt image, config changes need a mount/custom build).
New submission → Author widget: surname Hassan, first name Amad Ul → save.
REST/DB: dc.contributor.author = Hassan,Amad Ul (no space); the item page shows it without the space.
Suggested fix
clarin-name.model.ts:41: change the override to this.separator = ', ' (do NOT delete it — see the DI bug above). In get value() (54-68) trim both input values (otherwise a trailing space in the surname yields Hassan , Amad).
set value (70-95): tolerant split on the first comma via /,\s*/ + trim, so legacy space-less values (Hassan,Amad) and new ones (Hassan, Amad) both load correctly into the two inputs (legacy values self-normalize on the next save).
Fix the ClarinNameFieldParser DI wiring in parser-factory.ts (separator/translate in the right positions).
Tests: join uses ', ' + trims; split of both variants; surname-only value; parser wiring.
Original issue: ufal#169
Problem
With the author input configured as separate surname/firstname inputs, the item details page shows
Hassan,Amad Ulinstead ofHassan, Amad Ul— no space after the comma.Root cause (verified in code) — it is a STORAGE bug; the display renders the stored value verbatim
clarin-name, used only inclariahSubmissionsPageTwo(submission-forms.xml:1618) andteachingSubmissionsPageTwo(:1921) → DH Data and Teaching materials collections. The traditional form's author is a single autocomplete (:193).src/app/shared/form/builder/ds-dynamic-form-ui/models/clarin-name.model.ts:41: the constructor overridesthis.separator = ','(no space) aftersuper(), while the parentDynamicConcatModel(ds-dynamic-concat.model.ts:57) correctly doesconfig.separator + ' '.get value()(59-60) then joinssurname + ',' + firstname→Hassan,Amad Ulis what gets stored.parser-factory.ts:27-33definesfieldParserDepsas 5 positional deps ending withTranslateService, butClarinNameFieldParser's 5th constructor parameter isseparator: string(clarin-name-field-parser.ts:25-36) — soseparatorreceives the TranslateService instance andtranslateis undefined.config.separatoris therefore an object, and the hard-coded','in the model is the only functioning separator.clarin-shared-util.ts:85(name: authorMV.value) +clarin-item-author-preview.component.html:8({{ author.name }}).,\Smatch) — the reported value likely lives in an in-flight workspace/workflow item or another instance. Curation must therefore also cover workspace/workflow items; worth asking the reporter where they saw it.author_acand come back as suggestions on the traditional form.Reproduction (local docker stack)
clariahSubmissions/teachingSubmissions(fresh DB has no such handles — create + map; docker compose uses a prebuilt image, config changes need a mount/custom build).Hassan, first nameAmad Ul→ save.dc.contributor.author=Hassan,Amad Ul(no space); the item page shows it without the space.Suggested fix
clarin-name.model.ts:41: change the override tothis.separator = ', '(do NOT delete it — see the DI bug above). Inget value()(54-68) trim both input values (otherwise a trailing space in the surname yieldsHassan , Amad).set value(70-95): tolerant split on the first comma via/,\s*/+ trim, so legacy space-less values (Hassan,Amad) and new ones (Hassan, Amad) both load correctly into the two inputs (legacy values self-normalize on the next save).ClarinNameFieldParserDI wiring inparser-factory.ts(separator/translate in the right positions).', '+ trims; split of both variants; surname-only value; parser wiring.,\S) and one-off curation (including workspace/workflow items) + Solr reindex incl.author_acare tracked in UFAL/Metadata QA detectors, backend hardening and data curation for issues 1388/1387/169 DSpace#1373.