Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034465Retail ModulesStoreServerpublic2016-11-10 16:512017-06-07 00:40
ioritzCia 
AugustoMauch 
normalmajorsometimes
closedfixed 
30Ubuntu 14.04
 
RR17Q3 
mtaal
No
0034465: Initialize.bp.segmentation.tables does not take into account BPartners of gift card instances
Regarding: http://wiki.openbravo.com/wiki/Projects:Store_Server_BP_Data_Segmentation [^]

You might have Business Partners you want to export to a store that do not have an order but they have a gift card

To check if more entities require this
- Create a new Business Partner
- Create a Gift Card for a store and assign previous Business Partner
- Validate previous store

More precise steps can be detailed if required
Add the following insert query into the InitializeBusinessPartnerSegmentationTables.java process


insert into obstsyn_server_bpartner(obstsyn_server_bpartner_id, ad_client_id, ad_org_id, isactive,
                                   createdby, updatedby, obmobc_server_definition_id, c_bpartner_id)
select get_uuid(), min(gc.ad_client_id), min(gc.ad_org_id), 'Y',
       '100', '100', so.obmobc_server_definition_id, gc.c_bpartner_id
from gcnv_giftcard_inst gc
  inner join obmobc_server_orgs so on (gc.ad_org_id = so.server_org_id)
  left join obstsyn_server_bpartner sbp on (sbp.c_bpartner_id = gc.c_bpartner_id)
where sbp.c_bpartner_id is null
group by gc.c_bpartner_id, so.obmobc_server_definition_id;
No tags attached.
related to defect 0033727 new AugustoMauch Improve the initialization of the tables related with business partner segmentation 
related to defect 0035645 closed AugustoMauch Prevent invoking a commitAndClose inside an event handler 
Issue History
2016-11-10 16:51ioritzCiaNew Issue
2016-11-10 16:51ioritzCiaAssigned To => StoreServer
2016-11-10 16:51ioritzCiaTriggers an Emergency Pack => No
2016-11-10 16:51ioritzCiaDescription Updatedbug_revision_view_page.php?rev_id=13634#r13634
2016-11-21 11:57mtaalAssigned ToStoreServer => AugustoMauch
2016-11-21 15:47ioritzCiaResolution time => 1481756400
2017-01-04 17:33dmitry_mezentsevNote Added: 0093194
2017-01-05 10:07AugustoMauchRelationship addedrelated to 0033727
2017-01-30 17:51mtaalAssigned ToAugustoMauch => mtaal
2017-02-12 23:51mtaalResolution time1481756400 => 1488322800
2017-02-12 23:52mtaalNote Added: 0094230
2017-02-13 07:27hgbotCheckin
2017-02-13 07:27hgbotNote Added: 0094231
2017-03-29 11:09AugustoMauchAssigned Tomtaal => AugustoMauch
2017-03-29 19:25AugustoMauchRelationship addedrelated to 0035645
2017-03-29 19:31hgbotCheckin
2017-03-29 19:31hgbotNote Added: 0095678
2017-03-30 11:25hgbotCheckin
2017-03-30 11:25hgbotNote Added: 0095694
2017-05-22 12:16mtaalReview Assigned To => mtaal
2017-05-22 12:36hgbotCheckin
2017-05-22 12:36hgbotNote Added: 0096705
2017-05-22 18:28AugustoMauchStatusnew => scheduled
2017-05-22 18:28AugustoMauchStatusscheduled => resolved
2017-05-22 18:28AugustoMauchResolutionopen => fixed
2017-05-22 18:28AugustoMauchFixed in SCM revision => https://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards.synchronization/rev/6c79086191e0f45311c35925e0612c74cbc5afbd [^]
2017-06-07 00:40mtaalNote Added: 0097180
2017-06-07 00:40mtaalStatusresolved => closed
2017-06-07 00:40mtaalFixed in Version => RR17Q3

Notes
(0093194)
dmitry_mezentsev   
2017-01-04 17:33   
Could you react to this issue, please?
1.5 months without any action.
(0094230)
mtaal   
2017-02-12 23:52   
Needed discussion with customer, reaction received in week of 8 February. Solution to be provided during February.
(0094231)
hgbot   
2017-02-13 07:27   
Repository: erp/pmods/org.openbravo.retail.giftcards.synchronization
Changeset: bbb34f393c1062d14fc47afd146a8d3b4a3b9d17
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Feb 13 07:27:19 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards.synchronization/rev/bbb34f393c1062d14fc47afd146a8d3b4a3b9d17 [^]

Related to issue 34465: Initialize.bp.segmentation.tables does not take into account BPartners of gift card instances
Added a task to initialize bp segmentations from gift cards

---
A build.xml
A src/org/openbravo/retail/giftcards/synchronization/BusinessPartnerSegmentationPopulator_data.xsql
A src/org/openbravo/retail/giftcards/synchronization/InitializeBusinessPartnerSegmentationTables.java
---
(0095678)
hgbot   
2017-03-29 19:31   
Repository: erp/pmods/org.openbravo.retail.giftcards.synchronization
Changeset: 6c79086191e0f45311c35925e0612c74cbc5afbd
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Mar 29 19:30:32 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards.synchronization/rev/6c79086191e0f45311c35925e0612c74cbc5afbd [^]

Related with issue 34465: Adds bp to store when giftcard instance is created

When a business partner is referenced in a giftcard instance, the new event handler will add the business partner to the referenced store if it is not already a customer.

Pending: do the same when the giftcard instance is created from the POS.

---
A src/org/openbravo/retail/giftcards/synchronization/eventhandler/GiftCardInstanceEventHandler.java
---
(0095694)
hgbot   
2017-03-30 11:25   
Repository: erp/pmods/org.openbravo.retail.giftcards.synchronization
Changeset: 4be0e3d0c83f876b3cee2a5d2c31a4f1a13e7589
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Mar 30 11:24:40 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards.synchronization/rev/4be0e3d0c83f876b3cee2a5d2c31a4f1a13e7589 [^]

Related with issue 34465: Backs out previous changeset

The changeset 13:6c79086191e0 has been backed out, because it depends on another changeset that is not present on some environments when the giftcards.replication module is used.

---
R src/org/openbravo/retail/giftcards/synchronization/eventhandler/GiftCardInstanceEventHandler.java
---
(0096705)
hgbot   
2017-05-22 12:36   
Repository: erp/pmods/org.openbravo.retail.giftcards.synchronization
Changeset: 364bb1affe07299590a496d61fdde86a85ee54b7
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Mar 29 19:30:32 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards.synchronization/rev/364bb1affe07299590a496d61fdde86a85ee54b7 [^]

Related with issue 34465: Adds bp to store when giftcard instance is created

When a business partner is referenced in a giftcard instance, the new event handler will add the business partner to the referenced store if it is not already a customer.

Pending: do the same when the giftcard instance is created from the POS.

---
A src/org/openbravo/retail/giftcards/synchronization/eventhandler/GiftCardInstanceEventHandler.java
---
(0097180)
mtaal   
2017-06-07 00:40   
Reviewed and tested