NHMDenmark / Mass-Digitizer

Common repo for the DaSSCo team
Apache License 2.0
1 stars 0 forks source link

Validation for eight or nine digit catalog numbers #368

Closed jlegind closed 1 year ago

jlegind commented 1 year ago

What is the issue ?

We check catalog numbers for an eight digits catalog number length. The barcode are printed with eight digits. Currently the App has eight digits as a hard requirement.

Very closely related to #364

Right now the App autosaves on eight digit input, yet other collections might have nine digit barcodes.
( Perhaps even more than that)

Estimate level of effort required.

# easy to medium

What is the expected acceptable result.

We need to know which catalog number formats can be expected and allow for these to pass a check.

In case there are only two catalog number standards (8 or 9 digits) then the solution would be to test for that range of formats.
This is the bounded problem.

Otherwise we could have an ad hoc solution which conforms to the collection in question: There needs to be an overview of the catalog number formats we can encounter.
If this is an unbounded problem then we might have to abandon the catalog numbers check.

What could be the challenges ?

One of the issues might be that there are many different catalog number formats. A large issue is the auto-save feature which activates on 8 digit input. If the input
is 9 digits this feature would cut off the last digit. Can we guarantee that it is only digits or can we come across catalog numbers containing text?!

What test are required ?

Depending on the diversity of catalog number formats, the test suite could become extensive.
In essence we would need to test for all possible catalog numbers we could encounter. (Problem of unboundedness)

FedorSteeman commented 1 year ago

Duplicate of #356