Closed mico closed 4 weeks ago
Agree with use case.
@ronaldtse for #new_edition_of?
could be provided identifier that related to another document like
Identifier.parse("ISO 22610:2018").new_edition_of?("ISO/PRF 6709:2022")
But also can be provided even identifier from different provider:
Identifier.parse("ISO 22610:2018").new_edition_of?("BS 7121-3:2017")
What should we do in these cases? Returning false
would be not completely correct, because it might mean that original identifier newer edition, which is not correct because documents are not related.
Raising an error, wouldn't it be too redundant?
@andrew2net any thoughts?
I think it's just false
because we can't really raise an error...
@ronaldtse should we also compare supplements, drafts editions?
Like ISO/IEC/IEEE 8802-22.2:2015/Amd.2:2017
, IEEE Draft Std PC57.21/D14, December 2007
?
I think it's just
false
because we can't really raise an error...
Or maybe we throw an error that it cannot be compared?
I think it's just
false
because we can't really raise an error...Or maybe we throw an error that it cannot be compared?
- different publishers can’t be compared?
- amd and cor cannot be compared?
@ronaldtse I can just throw an error when identifiers doesn't match without edition
Or we can just return nil
for not comparable IDs. So the caller method can decide what to do with it.
Or we can just return
nil
for not comparable IDs. So the caller method can decide what to do with it.
@andrew2net it's quite uncommon to return anything else except true or false for #?
methods...
After talking with @andrew2net we decided not to compare identifiers without year or edition because it's not correct,
ISO 1
might represent latest edition but we don't know what is the latest year.
Also for comparison in relaton
we don't need comparison for identifiers without year.
So I'll update code in pull request accordingly.
Also for comparison in
relaton
we don't need comparison for identifiers without year.
@mico actually we do need comparison IDs without year in Relaton, but it's not like in this issue.
related #47