metanorma / pubid-bsi

BSI Publication Identifiers
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Adoptions need to respect year in parameter #46

Closed opoudjis closed 9 months ago

opoudjis commented 12 months ago

The current implementation of bsi is assuming, in the case of the adopted parameter, that the year will be supplied in the adopted identifier value. It must not: the year in the identifier call overrides it, and we have documents where the adopted identifier is not given with a year.

So:

Pubid::Bsi::Identifier.create(number: 639, adopted: Pubid::Cen::Identifier.parse("EN ISO 639:2012")).to_s == 
"BS EN ISO 639:2012"

but:

Pubid::Bsi::Identifier.create(number: 639, year: "2013", adopted: Pubid::Cen::Identifier.parse("EN ISO 639:2012")).to_s ==
   "BS EN ISO 639:2013" # (currently is "BS EN ISO 639:2012")
Pubid::Bsi::Identifier.create(number: 639, year: "2013", adopted: Pubid::Cen::Identifier.parse("EN ISO 639")).to_s == 
  "BS EN ISO 639:2013" # (currently is "BS EN ISO 639")
opoudjis commented 9 months ago

@mico Please release pubid-bsi, so I can resolve https://github.com/metanorma/metanorma-iso/issues/1103

mico commented 9 months ago

@mico Please release pubid-bsi, so I can resolve metanorma/metanorma-iso#1103

@opoudjis done