Must add a link to the Evidentia in the FI after the print link. This is a little bit more difficult, as I have to search all packages whether they have an matching EAN13. Done. Looks like
Must also add a new column in the search result to display the new evidentia 16x16 icon. Fixed:
Pushed commit Added evidentia product_link to FI
Must fix import spec test. Done.
Must achieve 100% coverage in lib/migel/util/csv_importer.rb.
Analysing the code I find that there are two different migel products for german and french, whereas in oddb.org we have only one registration, package etc where we store localized names. And in the model of migel products we also define multilingual :article_name. Pondering how this is somehow resolved via the mode_super.
Checking whether we should use pharmacode or ean_code as primary key for a search via bin/admin
pry(#<Migel::Util::CsvImporter>)> products.values.find_all{|x| x.pharmacode}.size => 11273 pry(#<Migel::Util::CsvImporter>)> products.values.find_all{|x| x.pharmacode || x.ean_code}.size => 11273 pry(#<Migel::Util::CsvImporter>)> products.values.find_all{|x| x.pharmacode && !x.ean_code}.size => 2107 pry(#<Migel::Util::CsvImporter>)> products.values.find_all{|x| !x.pharmacode && x.ean_code}.size => 0 pry(#<Migel::Util::CsvImporter>)> products.values.find_all{|x| x.pharmacode == nil && x.ean_code == nil}.size => 0 pry(#<Migel::Util::CsvImporter>)> products.size => 11273 pry(#<Migel::Util::CsvImporter>)> products.values.collect{|x| x.migel_code}.size => 11273 pry(#<Migel::Util::CsvImporter>)> products.values.collect{|x| x.migel_code}.uniq.size => 260 pry(#<Migel::Util::CsvImporter>)> products.values.collect{|x| [x.migel_code, x.language]}.uniq.size => 359 pry(#<Migel::Util::CsvImporter>)> products.values.collect{|x| x.localized_name('de') }.uniq.size => 11174 pry(#<Migel::Util::CsvImporter>)> products.values.collect{|x| x.localized_name('fr') }.uniq.size => 11174
Conclusions:
Why do migel products have methods like :treetop_camelize, :to_lf, :to_nfc, :codepoints?