Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039218Openbravo ERPA. Platformpublic2018-09-03 18:472019-03-28 14:56
vmromanos 
jarmendariz 
normalmajoralways
closedfixed 
5
 
3.0PR19Q2 
AugustoMauch
Core
No
0039218: Hidden value in grid not updating properly from null value when changed via Process
Assume we have a table (T) with a record of which a field (T.col1) is set to null. T.col1 value is not shown in the GridView and the Window has a process definition that changes its value.

First time we execute the process, we can see in the parameters that T.col1 value is passed as empty string instead of null. Next time the process is executed for the same record, T.col1 value in parameters is still "" instead of the actual value set in the previous process execution.
* Apply the patch file attached to this issue. (39218-scenario.patch)
* Recompile using ant smartbuild -Dlocal=no and start Tomcat

* Go to Product Window
* Filter the grid to select "Orange Juice bio"
* Press the "Set Attribute Set Instance" process button in the Toolbar.
* In the popup that appears press Done.

At this point notice that the console has a log line that shows the following:

2018-12-24 13:29:24,341 [http-bio-8080-exec-14] INFO org.openbravo.materialmgmt.actionhandler.SetAttrSetInstance - Parameter inpmAttributesetinstanceId. Value=

* Press again the "Set Attribute Set Instance" button and then "Done" in the popup.

Another log line appears showing again that inpmAttributesetinstanceId is empty, but in this case there should be an UUID value:

2018-12-24 13:29:38,250 [http-bio-8080-exec-7] INFO org.openbravo.materialmgmt.actionhandler.SetAttrSetInstance - Parameter inpmAttributesetinstanceId. Value=


* Finally close the Product Window and open it again.
* Filter the grid to select "Orange Juice bio"
* Press the "Set Attribute Set Instance" process button and press "Done" in the popup.

This time the correct UUID appears in the log:

2018-12-24 13:30:04,053 [http-bio-8080-exec-2] INFO org.openbravo.materialmgmt.actionhandler.SetAttrSetInstance - Parameter inpmAttributesetinstanceId. Value= 0BD1F69F312D4831A5B36EA184B420DF

The FIC returns some fields as empty string when they're actually null. This situation is properly handled by AdvancedQueryBuilder. But this value is stored on client side as the record's edit values and this is not cleared when returning from a process, so this takes precedence over the actual value. This causes the value not to be sent updated the second time the process is called. Just clear the selected records edit data when returning from a process.
No tags attached.
patch 39218-scenario.patch (13,827) 2018-12-24 13:38
https://issues.openbravo.com/file_download.php?file_id=12452&type=bug
patch 39218-fix.patch (3,097) 2018-12-24 17:13
https://issues.openbravo.com/file_download.php?file_id=12453&type=bug
Issue History
2018-09-03 18:47vmromanosNew Issue
2018-09-03 18:47vmromanosAssigned To => platform
2018-09-03 18:47vmromanosModules => Core
2018-09-03 18:47vmromanosTriggers an Emergency Pack => No
2018-09-05 09:57vmromanosSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17601#r17601
2018-11-16 09:22jarmendarizAssigned Toplatform => jarmendariz
2018-11-16 10:08jarmendarizSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17926#r17926
2018-12-19 16:57jarmendarizStatusnew => scheduled
2018-12-24 13:38jarmendarizFile Added: 39218-scenario.patch
2018-12-24 14:10jarmendarizSummaryNull and empty string ("") management in tab's HQL Where clause when @Entity.property@ is involved => Hidden value in grid not updating properly from null value when changed via Process
2018-12-24 14:10jarmendarizDescription Updatedbug_revision_view_page.php?rev_id=18072#r18072
2018-12-24 14:19jarmendarizSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18073#r18073
2018-12-24 16:54jarmendarizProposed Solution updated
2018-12-24 17:13jarmendarizFile Added: 39218-fix.patch
2019-03-01 10:09hgbotCheckin
2019-03-01 10:09hgbotNote Added: 0110148
2019-03-01 10:09hgbotStatusscheduled => resolved
2019-03-01 10:09hgbotResolutionopen => fixed
2019-03-01 10:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b76233d16c1d2fbc333d88f794e8984d2acf8c88 [^]
2019-03-01 10:09jarmendarizReview Assigned To => AugustoMauch
2019-03-01 10:55hgbotCheckin
2019-03-01 10:55hgbotNote Added: 0110149
2019-03-05 18:24AugustoMauchNote Added: 0110243
2019-03-05 18:24AugustoMauchStatusresolved => closed
2019-03-05 18:24AugustoMauchFixed in Version => 3.0PR19Q2
2019-03-28 14:56hudsonbotCheckin
2019-03-28 14:56hudsonbotNote Added: 0110840
2019-03-28 14:56hudsonbotCheckin
2019-03-28 14:56hudsonbotNote Added: 0110841

Notes
(0110148)
hgbot   
2019-03-01 10:09   
Repository: erp/devel/pi
Changeset: b76233d16c1d2fbc333d88f794e8984d2acf8c88
Author: Javier Armendáriz <javier.armendariz <at> openbravo.com>
Date: Fri Mar 01 09:54:48 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b76233d16c1d2fbc333d88f794e8984d2acf8c88 [^]

Fixed issue 39218: Hidden value in grid not updated when edited in process

This changeset removes the edit values in the selected fields either after
refreshing the grid view or when returning from a process to make sure the
values passed are always up-to-date.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js
---
(0110149)
hgbot   
2019-03-01 10:55   
Repository: erp/devel/pi
Changeset: 5188888c401e369538a1a5989a188438e247dd8c
Author: Javier Armendáriz <javier.armendariz <at> openbravo.com>
Date: Fri Mar 01 10:53:44 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5188888c401e369538a1a5989a188438e247dd8c [^]

Related to issue 39218: Hidden value in grid not updated when edited in process

Applied js formatting

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js
---
(0110243)
AugustoMauch   
2019-03-05 18:24   
Code reviewed and verified
(0110840)
hudsonbot   
2019-03-28 14:56   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b2fbc1588df4 [^]
Maturity status: Test
(0110841)
hudsonbot   
2019-03-28 14:56   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b2fbc1588df4 [^]
Maturity status: Test