Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0045823Openbravo ERP02. Master data managementpublic2021-02-01 12:202021-02-23 17:17
sebastien_liron 
markmm82 
highmajoralways
closedfixed 
5
 
PR21Q2 
Core
No
0045823: A hard limit exist for manually creates products variants
A hard limit exist for manually creates products variants

if (variantNumber > 1000) {
        throw new OBException("HighRecords");
      }

Here : org.openbravo.materialmgmt.ManageVariantsDS

From product Team :
That 1000 limit was put there to prevent performance problems. If you need to increase that limit, one way to do it would be to replace the hardcoded limit with a value read from a preference (like TreeDatasourceFetchLimit does) so that clients can increase that value ONLY after checking that the performance is good enough in the worst case.

- in the ERP
- create a variant product
- add several carac to it with a lor of values
- use the generate variant button
one way to do it would be to replace the hardcoded limit with a value read from a preference (like TreeDatasourceFetchLimit does)
No tags attached.
Issue History
2021-02-01 12:20sebastien_lironNew Issue
2021-02-01 12:20sebastien_lironAssigned To => Triage Finance
2021-02-01 12:20sebastien_lironModules => Core
2021-02-01 12:20sebastien_lironResolution time => 1613775600
2021-02-01 12:20sebastien_lironTriggers an Emergency Pack => No
2021-02-19 11:41vmromanosCategory06. Material requirement planning (MRP) => 02. Master data management
2021-02-19 11:41vmromanosTypedesign defect => defect
2021-02-19 11:41vmromanosTarget VersionPR20Q3.4 =>
2021-02-22 13:31markmm82Assigned ToTriage Finance => markmm82
2021-02-22 13:31markmm82Statusnew => scheduled
2021-02-22 18:18markmm82Note Added: 0126277
2021-02-22 20:56hgbotNote Added: 0126280
2021-02-23 13:51markmm82Note Edited: 0126277bug_revision_view_page.php?bugnote_id=0126277#r22142
2021-02-23 17:17hgbotResolutionopen => fixed
2021-02-23 17:17hgbotStatusscheduled => closed
2021-02-23 17:17hgbotNote Added: 0126307
2021-02-23 17:17hgbotFixed in Version => PR21Q2
2021-02-23 17:17hgbotNote Added: 0126308

Notes
(0126277)
markmm82   
2021-02-22 18:18   
(edited on: 2021-02-23 13:51)
Test Plan:
Log in the ERP as F&B
- Go to Product window and create a variant product
- Go to Characteristic tab and add several characteristics to it with some values
- Execute "Manage Variants" process by clicking on the button.
- Notice all possible variants of selected characteristics are shown.
- Done and check process ends successfully.

- Create a new preference visible at F&B client
  Property List = false
  Attribute = ManageVariantsLimit
  Value = 3
- Go to created product and execute the "Manage Variants" process again.
- Notice an error message is shown:
  "The number of records (<number>) is too high. Please, either try to review and reduce the number of product characteristics or alternatively set the ManageVariantsLimit preference to a higher value than 3"

- Change the new preference value to 1000
- Execute "Manage Variants" process by clicking on the button.
- Notice there isn't any error message and all possible variants of selected characteristics are shown.
- Done and check process ends successfully.

(0126280)
hgbot   
2021-02-22 20:56   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/318 [^]
(0126307)
hgbot   
2021-02-23 17:17   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/318 [^]
(0126308)
hgbot   
2021-02-23 17:17   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 58495fbf6ca54792acda306179b30561c24e307d
Author: Mark Orlando Molina <markmm82@gmail.com>
Date: 2021-02-23T16:17:49+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/58495fbf6ca54792acda306179b30561c24e307d [^]

Fixes ISSUE-45823: Created new "ManageVariantsLimit" preference limit

Currently was hard-coded a fixed limit of 1000 possible records that can be created when processing products variants.

To make more flexible this limit, a new "ManageVariantsLimit" preference is created as an attribute preference to handle this threshold in a more configurable way.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_PREFERENCE.xml
M src/org/openbravo/materialmgmt/ManageVariantsDS.java
---