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
Numeric characters in relation codes for 'typed relation' field result in Workbench validation error #701
Comments
Can you check out the issue_701 branch and test? |
islandora_workbench/workbench_utils.py Line 5491 in d55dea7
if not re.match("^[09-0a-zA-Z]+:[0-9a-zA-Z]+:.+$", field_value.strip()): should probably be if not re.match("^[0-9a-zA-Z]+:[0-9a-zA-Z]+:.+$", field_value.strip()): |
(Seems to work fine if I correct the typo locally.) |
Duh, thanks, I'll fix that. |
OK, typo fixed, can you retest? |
Works great, thank you very much! |
OK, great. I'm going to do a little testing this evening to make sure the change has no side effects, and if it doesn't (I don't think it will), I'll merge it into the main branch. Thanks for finding this bug. |
Issue_701 branch merged into main. Thanks again @eldonquijote for finding this and for testing the fix. |
islandora_workbench/workbench_utils.py
Line 5491 in 7c66389
assumes that the relationship code for typed relation fields contains all letters (as is the case with MARC relator codes). We are using AAT terms to describe roles/relationships in addition to MARC relator codes; the AAT term identifiers are numbers though. Workbench throws a validation error for an entry in an import CSV like aat:300024987:person:Wees, J.L., even if the relation is listed in the field configuration (aat:300024987|architect (aat)). Ideally, Workbench should accept/validate alphanumeric values as configured.
The text was updated successfully, but these errors were encountered: