muscat
muscat copied to clipboard
Validation for field 100$a across templates
We'd like a more refined validation for the field 100$a in the templates. This is for Composer/Author, i.e. composer in notated music but author for libretti and treatises. Currently there is no validation. A composer/author, even if Anonymus, should always be named for single items (i.e., not collections). Ideally it should be required for all single items, but due to the fact that printed music uses identical templates for collections and single items, a strict validation is not possible (so we can't require a composer here because a printed collection might not have a single composer). Therefore I propose the following:
- [x] 1. 100$a should be required for the following templates: Handwritten documents
- source
- libretto_source
- theoretica_source
Printed documents
-
edition_content
-
libretto_edition_content
-
theoretica_edition_content
-
[ ] 2. 100$a should trigger a warning if it is not filled out for the following templates:
-
edition
-
libretto_edition
-
theoretica_edition I recommend a specific warning that points out the problem, such as "Please check whether a composer/author should be named."
-
[x] 3. In the template edition, the field 100 should be expanded by default. (It is closed, and people overlook it, entering the composer as a "cross-reference" in the 700.)
done with https://github.com/rism-digital/muscat/commit/b5337b7ed1f4e4eb3f5c804c5f29e7352bf8fbf8, this can be tested at http://lab.rism.info:3369/admin until 2022-02-10 Triggering an additional warning (point 2) is more difficult and probably not possible with the current config. Any ideas for an easy implementation?
Re # 3 above: can the 100 be yellow as well please? (It is yellow once expanded in Muscat, which is why I didn't say anything, but it is white on lab.)
Re 3: It would be yellow if it's mandatory for the edition template, but since it's only required, there is no color background
It needs to be yellow, please, as in 700 and 710.
Why do you need it yellow if it is not validated? Unfortunately as it is now we cannot have two different validation types on a same field (i.e. mandatory for manuscript, warning for print). This is in my wishlist, with the ability to validate multiple fields and IIIF validation we talked at the last meeting. I think we should think about a long needed complete overhaul of the validation for one of the next releases.
The yellow catches the eye. We want people to see this field. Can you make it validate, then? If 100 $j is filled out, then 100$a must be too. (As in 700 and 710.)
But this is how we have it now, if you fill $j and not $a Muscat gets upset, as it is a "required" field. If we make it "mandatory" (as Stephan did) then Muscat gets always upset if you do not fill $a regardless of $j status, but if we exclude it for some templates, then in those templates it is not validate al all (and thus, white)
Set level to "warning" for printed editions, libretti and threatises.
This is for 9.3.1: in validate_subtag? we can add an option that on different templates the validation behaves differently.