-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incomplete validation by creation of new processes #3403
Comments
It seems that there is no validation against the ruleset anymore. It might have the same cause as the problems described in the following issues: |
I think this has to do with some changes to the template done in the following PR: #5026 Maybe @solth can help here because the PR seems to have introduced a change which sets the mandatory metadata fields to required fields only in the case of the metadata editor
|
@solth can you check why you defined the metadata fields in a way that the required attribute is only set in the editor? And not in the process creation form. I have some elements which are only editable during process creation, but i cannot enforce them as required there. |
@andre-hohmann @solth I just looked into this again and the situation right now is the following. An input element in the creation form of a process or in the metadata editor is (apart from the process title) never marked as required, because the condition "#{request.requestURI.contains('metadataEditor') and item.required and (not empty param['editForm:save'] or not empty param['editForm:saveContinue']) basically says: Only mark an element as required if
This constellation never appears (because the metadata editor only has a "Save and Exit" (not "Save and Continue Button") and the process creation form's url does not contain The main question is: Should there be situations where a user is disallowed to save when required values are not set. (By making certain fields required.) One situation where this might be necessary would be, when a value is required and can only be set during process creation. It is then necessary to actually enforce that in the application. And i have scenarios where i definitely want this. The problem would of course be that the way things are implemented right now, this would be true for every required key (as defined by ruleset) displayed on the process creation form. And there might of course be situations where a generally required key is not known during process creation. So the user has to enter a placeholder value here. |
@BartChris : Thanks for the investigation. I support your point of view. It should be possible that users are disallowed to save the process creation form when required values are not set. If required fields are not set, the users will not be able to validate the process in the metadata editor without warnings and the export will be aborted. I cannot imagine a scenario in which the value of a required keys are not known in the process creation form. It is rather that way: The required keys are explicitly set in the process creation form to enable a validation. |
@andre-hohmann Is this issue about validating only the required metadata or validating all metadata against the ruleset (number of occurrences, valid values, ...) ? |
@IkramMaalej : I hope, we have the same understanding. For my understanding, this issue is about validating only the required metadata. If "TSL/ATS" "digital collections" or "rights information" are mandatory fields, but empty, the process should not be created, but an warning/error message should be shown as for example:
Or the lines of the mandatory field becomes another color - as it was with "TSL/ATS" in the first versions of Kitodo.Production 3. See: |
Problem
If a new process is created, the metadata is not validated for all mandatory metadata, according to the ruleset. The following metadata, however, is validated:
Solution
Kitodo.Production 2.x validated all shown metadata. That should be possible in Kitodo.Production 3.x, too. Probably, this is a question of configuration.
The text was updated successfully, but these errors were encountered: