lib/relaton_iso/iso_bibliography.rb in relaton-iso-0.6.0 vs lib/relaton_iso/iso_bibliography.rb in relaton-iso-0.6.1
- old
+ new
@@ -140,10 +140,11 @@
# Does not match corrigenda etc (e.g. ISO 3166-1:2006/Cor 1:2007)
# If no match, returns any years which caused mismatch, for error reporting
def isobib_results_filter(result, year)
missed_years = []
result.each do |s|
- return { ret: s.fetch } if !year
+ next if !year && s.hit["publicationStatus"] == "Withdrawn"
+ return { ret: s.fetch } unless year
%r{:(?<iyear>\d{4})} =~ s.hit["docRef"]
return { ret: s.fetch } if iyear == year
missed_years << iyear