Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043784Openbravo ERPA. Platformpublic2020-04-20 12:442020-04-27 12:11
sebastien_liron 
cberner 
urgentmajoralways
closedfixed 
30Openbravo Appliance 14.04
3.0PR19Q2 
PR20Q3 
caristu
Google Chrome
Core
No
0043784: OBMultiSelectorItem parameter values are not saved in the form
OBMultiSelectorItem parameter values are not saved in the form. This is because OBMultiSelectorItem extends CanvasItem and by default no value from the CanvasItem is be saved in the DynamicForm values. See[1].

This behavior causes that the selected values in the multiselector are never sent to the backend when a P&E grid is refreshed[2]. But the rest of parameter values are indeed being sent.

[1] https://www.smartclient.com/smartclient-release/isomorphic/system/reference/?id=search%3DCanvasItem [^]
[2] https://gitlab.com/openbravo/product/openbravo/-/blob/master/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js#L206 [^]
1) Install the following module: https://gitlab.com/openbravo/demo/org.openbravo.platform.features [^]
2) Apply the attached patch (gridAndMultipleSelector.diff) on that module which provides the functionality to reproduce the issue.
3) ant smartbuild -Dlocal=no
4) Open the "Process Definition test" window
5) Select a business partner with the SingleBP parameter and note that the grid is refreshed correctly filtering by the selected business partner
6) Use the MultiBP parameter and select several business partners. Note that the grid is NOT refreshed filtering by the selected business partners.
  6A) Check the SimpleOrderHQLTransformer.java class and note that the filtering by MultiBP is not implemented because the selected values are not being received.
In the case of multiselectors we should override the default CanvasItem behavior because the default behavior is is appropriate if the Canvas does not participate in editing a value of the form and is embedded in the form for layout or UI purposes only (e.g. ButtonItem, SectionItem).

In OBMultiSelectorItem we want to save its values in the form. See attached fix with a proposed solution to be tested in deep.
No tags attached.
related to defect 0026555pi closed AugustoMauch Problem in initialization of CanvasItem when a new record is created in grid mode. 
related to defect 0043849 closed cberner Multiselectors don't refresh form on change if no element is selected or if external X icon is pressed 
diff proposedFix.diff (1,097) 2020-04-21 12:41
https://issues.openbravo.com/file_download.php?file_id=14352&type=bug
diff gridAndMultipleSelector.diff (40,782) 2020-04-23 12:21
https://issues.openbravo.com/file_download.php?file_id=14367&type=bug
Issue History
2020-04-20 12:44sebastien_lironNew Issue
2020-04-20 12:44sebastien_lironAssigned To => platform
2020-04-20 12:44sebastien_lironFile Added: productCsvExporter_After_Implemeting_MultiSelector_20200417 (1).diff
2020-04-20 12:44sebastien_lironWeb browser => Google Chrome
2020-04-20 12:44sebastien_lironModules => Core
2020-04-20 12:44sebastien_lironTriggers an Emergency Pack => No
2020-04-21 06:44alostaleWeb browserGoogle Chrome => Google Chrome
2020-04-21 06:44alostalePriorityimmediate => urgent
2020-04-21 06:44alostaleSeveritycritical => major
2020-04-21 12:21caristuWeb browserGoogle Chrome => Google Chrome
2020-04-21 12:21caristuSummarymultiselector reference as non grid parameter data is not loaded in the HqlQueryTransformer transformHqlQuery parameters => multiselector parameter values are not saved in the form
2020-04-21 12:21caristuDescription Updatedbug_revision_view_page.php?rev_id=20821#r20821
2020-04-21 12:21caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20823#r20823
2020-04-21 12:21caristuProposed Solution updated
2020-04-21 12:21caristuFile Deleted: productCsvExporter_After_Implemeting_MultiSelector_20200417 (1).diff
2020-04-21 12:21caristuWeb browserGoogle Chrome => Google Chrome
2020-04-21 12:21caristuDescription Updatedbug_revision_view_page.php?rev_id=20824#r20824
2020-04-21 12:21caristuFile Added: gridAndMultipleSelector.diff
2020-04-21 12:25caristuFile Added: proposedFix.diff
2020-04-21 12:26caristuWeb browserGoogle Chrome => Google Chrome
2020-04-21 12:26caristuAssigned Toplatform => cberner
2020-04-21 12:28caristuRelationship addedrelated to 0026555
2020-04-21 12:29caristuWeb browserGoogle Chrome => Google Chrome
2020-04-21 12:29caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20825#r20825
2020-04-21 12:33caristuWeb browserGoogle Chrome => Google Chrome
2020-04-21 12:33caristuSummarymultiselector parameter values are not saved in the form => OBMultiSelectorItem parameter values are not saved in the form
2020-04-21 12:33caristuDescription Updatedbug_revision_view_page.php?rev_id=20826#r20826
2020-04-21 12:41caristuFile Deleted: proposedFix.diff
2020-04-21 12:41caristuFile Added: proposedFix.diff
2020-04-21 12:44caristuFile Deleted: gridAndMultipleSelector.diff
2020-04-21 12:44caristuFile Added: gridAndMultipleSelector.diff
2020-04-23 11:01caristuFile Deleted: gridAndMultipleSelector.diff
2020-04-23 11:01caristuFile Added: gridAndMultipleSelector.diff
2020-04-23 12:21cbernerFile Deleted: gridAndMultipleSelector.diff
2020-04-23 12:21cbernerFile Added: gridAndMultipleSelector.diff
2020-04-23 18:47cbernerRelationship addedrelated to 0043849
2020-04-23 18:48cbernerStatusnew => scheduled
2020-04-27 11:42hgbotCheckin
2020-04-27 11:42hgbotNote Added: 0119415
2020-04-27 11:42hgbotStatusscheduled => resolved
2020-04-27 11:42hgbotResolutionopen => fixed
2020-04-27 11:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/40cdc04087bfeec81f2ea0ad7669eee83338ece0 [^]
2020-04-27 12:11caristuReview Assigned To => caristu
2020-04-27 12:11caristuNote Added: 0119419
2020-04-27 12:11caristuStatusresolved => closed
2020-04-27 12:11caristuFixed in Version => 3.0PR20Q3
2020-04-27 12:14caristuNote Edited: 0119419bug_revision_view_page.php?bugnote_id=0119419#r20885

Notes
(0119415)
hgbot   
2020-04-27 11:42   
Repository: erp/devel/pi
Changeset: 40cdc04087bfeec81f2ea0ad7669eee83338ece0
Author: Cristian Berner <cristian.berner <at> openbravo.com>
Date: Thu Apr 23 18:59:31 2020 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/40cdc04087bfeec81f2ea0ad7669eee83338ece0 [^]

Fixes ISSUE-43784: MultiSelector parameter values are saved in form onChange

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-multi-selector-item.js
---
(0119419)
caristu   
2020-04-27 12:11   
(edited on: 2020-04-27 12:14)
Reviewed and tested.

- See MR: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/66 [^]
- Tested with the "Process Definition test" that can be found here: https://gitlab.com/openbravo/demo/org.openbravo.platform.features [^]