Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044515Retail ModulesWeb POSpublic2020-06-30 13:252020-10-30 08:07
marvintm 
prakashmurugesan88 
normalcriticalalways
closedfixed 
5
 
RR20Q4 
marvintm
No
0044515: Updating the "issummarylevel" property of a product category can lead to inconsistent data
The WebPOS loads the product category information by reading from the obretco_product_category table, which is updated using an EventHandler. This table is supposed to contain only non summary categories.

However, if a category is initially defined as non summary level and then it is changed to be summary, the record is not removed from OBRETCO_product_category, and this is not taken into account in the filter in the corresponding masterdata query, so the category ends up being loaded twice.

If the opposite happens, and the category is initially summary and changed to be non summary, then the record is not added, so the category is not loaded in the WebPOS.
Create a product category as non-summary level.
Verify that it is automatically added to the tab "Filter product categories" from the Assortments.
Change it to be summary.
Realise it is not removed from the Assortment.
Do a full refresh in the WebPOS. Check that the category is loaded twice in the request.
Either we change the eventhandler to take this case into account, or we change the masterdata queries to take it, to ensure that categories are always loaded when they need to be, and never twice.

See diff attached for the update on the m_product. it is still needed to create an eventhadler to ensure the case of isSummary from N to Y
No tags attached.
depends on backport 0045324RR20Q3.2 closed prakashmurugesan88 Updating the "issummarylevel" property of a product category can lead to inconsistent data 
depends on backport 0045325RR20Q2.3 closed prakashmurugesan88 Updating the "issummarylevel" property of a product category can lead to inconsistent data 
has duplicate defect 0041899 closed Retail It is possible to have a summary product category with products 
diff 44515.diff (4,483) 2020-07-21 15:02
https://issues.openbravo.com/file_download.php?file_id=14792&type=bug
patch I44515_20Q2.patch (9,588) 2020-10-28 18:53
https://issues.openbravo.com/file_download.php?file_id=15055&type=bug
Issue History
2020-06-30 13:25marvintmNew Issue
2020-06-30 13:25marvintmAssigned To => Retail
2020-06-30 13:25marvintmResolution time => 1596146400
2020-06-30 13:25marvintmTriggers an Emergency Pack => No
2020-07-21 14:23guillermogilResolution time1596146400 => 1595541600
2020-07-21 14:23guillermogilNote Added: 0121549
2020-07-21 14:23guillermogilSeveritymajor => critical
2020-07-21 15:02guillermogilFile Added: 44515.diff
2020-07-21 15:02guillermogilProposed Solution updated
2020-07-21 15:10guillermogilProposed Solution updated
2020-08-06 14:28prakashmurugesan88Assigned ToRetail => prakashmurugesan88
2020-08-10 11:57prakashmurugesan88Statusnew => scheduled
2020-08-11 07:25hgbotNote Added: 0121957
2020-08-17 06:54hgbotResolutionopen => fixed
2020-08-17 06:54hgbotStatusscheduled => closed
2020-08-17 06:54hgbotNote Added: 0122076
2020-08-17 06:54hgbotFixed in Version => RR20Q4
2020-08-17 06:54hgbotNote Added: 0122077
2020-10-28 16:59marvintmStatusclosed => new
2020-10-28 16:59marvintmResolutionfixed => open
2020-10-28 16:59marvintmFixed in VersionRR20Q4 =>
2020-10-28 16:59marvintmStatusnew => scheduled
2020-10-28 16:59marvintmStatusscheduled => resolved
2020-10-28 16:59marvintmFixed in Version => RR20Q4
2020-10-28 16:59marvintmResolutionopen => fixed
2020-10-28 16:59marvintmReview Assigned To => marvintm
2020-10-28 16:59marvintmStatusresolved => closed
2020-10-28 17:00marvintmRelationship addedhas duplicate 0041899
2020-10-28 18:53prakashmurugesan88File Added: I44515_20Q2.patch
2020-10-29 06:14hgbotNote Added: 0123986
2020-10-29 07:30hgbotNote Added: 0123989
2020-10-30 08:07hgbotNote Added: 0124034
2020-10-30 08:07hgbotFixed in VersionRR20Q4 => RR21Q1
2020-10-30 08:07hgbotNote Added: 0124035
2020-10-30 08:07hgbotFixed in VersionRR21Q1 => RR20Q4
2020-10-30 08:07hgbotNote Added: 0124036
2020-10-30 08:07hgbotNote Added: 0124037

Notes
(0121549)
guillermogil   
2020-07-21 14:23   
Updating severity as due to this error it can led to a continuous full refresh if the till was already logged.
It should never have categories set as isSummary on the obretco_productcategory
(0121957)
hgbot   
2020-08-11 07:25   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/55 [^]
(0122076)
hgbot   
2020-08-17 06:54   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/55 [^]
(0122077)
hgbot   
2020-08-17 06:54   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 5275418e63aad286623d480f3451cf3fcb09812a
Author: Prakash M <prakash@qualiantech.com>
Date: 2020-08-17T10:22:42+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/5275418e63aad286623d480f3451cf3fcb09812a [^]

Fixed BUG-44515 : Product Category is inserted to assortment even if issummarylevel is true
* This causes inconsistent data in webpos

* Validated issummarylevel='N' before inserting into assortment
* Added event handler to add or remove product category from assortment based on issummarylevel property

---
A src/org/openbravo/retail/posterminal/event/ProductCategoryEventHandler.java
M src/org/openbravo/retail/posterminal/UpdateProductCategoryByAssortmentBackground.java
M src/org/openbravo/retail/posterminal/event/ProductListEventHandler.java
---
(0123986)
hgbot   
2020-10-29 06:14   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/138 [^]
(0123989)
hgbot   
2020-10-29 07:30   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/141 [^]
(0124034)
hgbot   
2020-10-30 08:07   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/138 [^]
(0124035)
hgbot   
2020-10-30 08:07   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 7eea7f808345e906b2c05e0406961709de7c6e85
Author: Prakash M <prakash@qualiantech.com>
Date: 2020-10-30T07:06:52+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/7eea7f808345e906b2c05e0406961709de7c6e85 [^]

Fixed BUG-44515: Fixed error on unchecking Summary Level in product category window
* Issue occurs when product category is mapped to multiple products and those products used in multiple assortments
* Fixed by querying distinct assortment

---
M src/org/openbravo/retail/posterminal/event/ProductCategoryEventHandler.java
---
(0124036)
hgbot   
2020-10-30 08:07   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 3748c900c70c93591017f20c2abc069b78fa3f27
Author: Prakash M <prakash@qualiantech.com>
Date: 2020-10-30T07:07:23+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/3748c900c70c93591017f20c2abc069b78fa3f27 [^]

Fixed BUG-44515: Fixed error on unchecking Summary Level in product category window
* Issue occurs when product category is mapped to multiple products and those products used in multiple assortments
* Fixed by querying distinct assortment

---
M src/org/openbravo/retail/posterminal/event/ProductCategoryEventHandler.java
---
(0124037)
hgbot   
2020-10-30 08:07   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/141 [^]