view · edit · sidebar · attach · print · history

20160822-debug-product-confusion-sandoz-xmlconv-bbmb-ch-migrate-davaz-com

<< 20160823-migrate-davaz-com | Index | 20160819-debug-product-confusion-sandoz-xmlconv-bbmb-ch >>


Summary

  • Fixing broken ODBA database (especially INDEX) for sandoz.bbmb.ch
  • Fixing admin page on davaz.com

Commits / Patches / Pull Requests, Scripts

Index


Fix ODBA index pharmacode 6479653

A Product Pharmacode 6479653 (EAN code: 7680656510028) is still missing in ODBA INDEX table.
ODBA does not use PostgreSQL's normal INDEX, it uses just plane TABLE like INDEX.
ODBA cannot find any product without this INDEX. And this product is still missing in this INDEX.

44065710  Fulvestrant Sandoz 2 Fertigspritzen 250m  Fulvestrant Sandoz 2 seringue préremplie  7680656510028 6479653 703.76

Note: Artikel.txt has encoding as ISO-8859-1

See also http://dev.ywesee.com/Yasu/20160819-debug-product-confusion-sandoz-xmlconv-bbmb-ch#fixed-result.

It seems that ODBA does not have this product in objects table.
This means that we have to import this product.

ch.bbmb.sandoz> BBMB::Model::Product.odba_extent.find { |p| p.pcode.to_s == '6479653' }.class
-> NilClass

Import a product manually

In Updater, ProductImporter is called by bbmb as importer class.
So I would like to try importing a product via bin/admin manually (without CSV).

# bin/admin
ch.bbmb.sandoz> line = "44065710  Fulvestrant Sandoz 2 Fertigspritzen 250m  \
  Fulvestrant Sandoz 2 seringue préremplie  7680656510028  6479653  703.76".split(/\s{2}/); \
pi = BBMB::Util::ProductImporter.new; product = pi.import_record(line); p product
->

# application process
#<BBMB::Model::Product:0x005587cf2f6f00
@price=#<BBMB::Util::Money:0x005587cf2dafa8 @credits=70376>,
@ean13="7680656510028",
@backorder=false,
@article_number="44065710",
@description=#<BBMB::Util::Multilingual:0x005587cf2f43e0
  @canonical={:de=>"Fulvestrant Sandoz 2 Fertigspritzen 250m", :fr=>"Fulvestrant Sandoz 2 seringue préremplie"},
  @synonyms=[]>,
@pcode="6479653">

It seems good. Then I've saved this product with odba_store.

ch.bbmb.sandoz> line = "44065710  Fulvestrant Sandoz 2 Fertigspritzen 250m  \
  Fulvestrant Sandoz 2 seringue préremplie  7680656510028  6479653  703.76".split(/\s{2}/); \
pi = BBMB::Util::ProductImporter.new; product = pi.import_record(line); product.odba_store; p product

Then seach result:

ch.bbmb.sandoz> BBMB::Model::Product.find_by_pcode('6479653').class
-> BBMB::Model::Product

This is not solution for problem of ODBA's data structure or non-thread safe issue.
But I've fixed broken INDEX on current database. And we've changed starting time of updater job as mid-night on CEST.

Enable WSYIWIG editor on paintings admin page

The wsyiwig editor on admin page for paintings needs to be fixed.

The dijit Editor on Gallery and Works/Movies work, but others form on Works/{Drawings|Paitings|Photos|Multiples|Degins} do not work.
These use almost same code... why?

I was no able to find reason for this bug... (dojo or javascript load order issue?)

Fix new artobject creation

When I save new art object, all artobject's series are confused... :'( z.B. All Drawings are changed Paintings... What is this?

view · edit · sidebar · attach · print · history
Page last modified on August 22, 2016, at 04:58 PM