Skip to content
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

i-numbers can have a dotted suffix #2530

Merged
merged 6 commits into from
Jan 29, 2024
Merged

i-numbers can have a dotted suffix #2530

merged 6 commits into from
Jan 29, 2024

Conversation

paul-butcher
Copy link
Contributor

@paul-butcher paul-butcher commented Jan 24, 2024

What does this change?

See wellcomecollection/wellcomecollection.org#10565

There are some iconographic numbers (e.g. 3329263i.104 on vu3mwczx) which have a numeric suffix after a dot. These are currently being erroneously ignored by the validation that expects a number followed by i.

This fixes that bug.

How to test

This is pretty well isolated, so the unit tests should cover it quite well. When this has been deployed and the relevant records indexed, then records like vu3mwczx should show a Reference beneath the title (Reference: 3329263i.104 in this case), in the same way as https://wellcomecollection.org/works/g8j7y2xh

Have we considered potential risks?

It is syntactically possible that a Sierra record might have multiple valid 001 fields. If a dotted one appears ahead of an undotted one, then the reference displayed for that record will change.

  1. I don't think that is likely
  2. If it does happen, it will probably be more correct
  3. I think this number is only for display, and no machines are relying on it to preferentially point to a dotless i-number

@rcantin-w
Copy link
Contributor

rcantin-w commented Jan 24, 2024

I approve of the new regex, I've tested our known scenarios with a regex testing tool and it works nicely, but I can't approve the rest of the scala code 😬 so assigning others as reviewers.

https://regex101.com/
Screenshot 2024-01-24 at 16 57 09

@paul-butcher paul-butcher requested a review from a team January 26, 2024 09:27
@paul-butcher paul-butcher merged commit 6d24c8c into main Jan 29, 2024
1 check passed
@paul-butcher paul-butcher deleted the iconographic-number branch January 29, 2024 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants