k-int / gokb-phase1

Original GOKb repo - Moving to https://github.com/openlibraryenvironment/gokb
http://www.gokb.org
Other
11 stars 5 forks source link

Store ISSNs without hyphens #466

Closed kristenwilson closed 8 years ago

kristenwilson commented 8 years ago

Begin storing ISSNs in the database without hyphens. ISSNs should still display with hyphens in all end user contexts. ISSNs with hyphens should still be able to be ingested through Refine or submitted through the co-referencing service. This decision should not be applied to ISBNs.

ianibo commented 8 years ago

Done in the 6.x branch - Identifiers are now normalised and stored in the normname field of the component. Identifier components return their value in response to getName [So as to appear like most other components] - the patch in 6.0 means we can use normname to search for identifiers with hypen and other whitespace characters stripped out. A new formatters object has been introduced in to the system config along side other identifier namespace properties - this specifies closures to be used to format the normalised identifier. Initially this is a simple "if it's 8 chars long, split into 2 4 char groups". Obviously, this is a pretty gross simplification, but it should do us for now.