Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038548Openbravo ERPA. Platformpublic2018-05-14 18:572018-05-21 18:36
AtulOpenbravo 
caristu 
normalmajoralways
closedfixed 
5
 
3.0PR18Q3 
alostale
Core
Production - QA Approved
2018-03-07
3.0PR18Q2
https://code.openbravo.com/erp/devel/pi/rev/2a79f597da83 [^]
No
0038548: Default Expression in Selector Field does not work properly
Default expression in the selector field does not work properly.

for eg: In Goods Movement window, Stocked column in grid of Product selector should have default filter as Stocked = Yes

Expression used in reference: "Product Complete" | Defined Selector | Field | Stocked

if (OB.getWindowId() == '800051' ||
    OB.getWindowId() == '800052' ||
    OB.getWindowId() == '800096' ||
    OB.getWindowId() == '800027') {
  false
} else {
    if (OB.isSalesTransaction() == true || OB.getWindowId() == '170') {
      true
    } else {
        false
    }
}

However it does not work in latest pi.
Test Plan

- Go to Goods Movement window and create a new record. Fill mandatory fields
- Go to Lines tab and create a new record.
- Press magnifying glass in Product selector.
- Check default filter in Stocked column of selector does not have filter applied as Stocked = Yes.
No tags attached.
depends on backport 00385563.0PR18Q2.1 closed caristu Default Expression in Selector Field does not work properly 
caused by defect 00380613.0PR18Q2 closed alostale Selector filter expression with OB.isSalesTransaction() doesn't work when called from a Process Definition 
has duplicate defect 0038784 closed platform Sales order line's product selector doesn't filter by warehouse 
blocks defect 0038522 scheduled AtulOpenbravo Product Selector in Goods Shipment Line should be automatically filtered by the selected product if "Create Lines From" is used. 
Issue History
2018-05-14 18:57AtulOpenbravoNew Issue
2018-05-14 18:57AtulOpenbravoAssigned To => platform
2018-05-14 18:57AtulOpenbravoModules => Core
2018-05-14 18:57AtulOpenbravoTriggers an Emergency Pack => No
2018-05-14 18:58AtulOpenbravoRelationship addedcaused by 0038061
2018-05-14 19:00AtulOpenbravoDescription Updatedbug_revision_view_page.php?rev_id=17139#r17139
2018-05-14 19:02aferrazRegression level => Production - QA Approved
2018-05-14 19:02aferrazRegression introduced in release => 3.0PR18Q2
2018-05-14 19:03aferrazRegression date => 2018-03-07
2018-05-14 19:03aferrazRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/2a79f597da83 [^]
2018-05-14 19:27aferrazRelationship addedblocks 0038522
2018-05-16 09:26caristuAssigned Toplatform => caristu
2018-05-16 09:28caristuStatusnew => scheduled
2018-05-17 10:20hgbotCheckin
2018-05-17 10:20hgbotNote Added: 0104559
2018-05-17 10:20hgbotStatusscheduled => resolved
2018-05-17 10:20hgbotResolutionopen => fixed
2018-05-17 10:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d0cc878c56579383583de589f4a031563098d47c [^]
2018-05-17 10:21caristuReview Assigned To => alostale
2018-05-17 10:30hgbotCheckin
2018-05-17 10:30hgbotNote Added: 0104560
2018-05-17 18:46hgbotCheckin
2018-05-17 18:46hgbotNote Added: 0104573
2018-05-17 21:41hudsonbotCheckin
2018-05-17 21:41hudsonbotNote Added: 0104578
2018-05-17 21:41hudsonbotCheckin
2018-05-17 21:41hudsonbotNote Added: 0104579
2018-05-18 09:06alostaleNote Added: 0104585
2018-05-18 09:06alostaleStatusresolved => closed
2018-05-18 09:06alostaleFixed in Version => 3.0PR18Q3
2018-05-21 18:36hudsonbotCheckin
2018-05-21 18:36hudsonbotNote Added: 0104620
2018-06-20 09:48caristuRelationship addedhas duplicate 0038784

Notes
(0104559)
hgbot   
2018-05-17 10:20   
Repository: erp/devel/pi
Changeset: d0cc878c56579383583de589f4a031563098d47c
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu May 17 10:05:57 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d0cc878c56579383583de589f4a031563098d47c [^]

fixes issue 38548: Default Expression in Selector Field does not work properly

  After the changes introduced with[1] the request data is send to the SelectorDefaultFilterActionHandler as part of the POST payload rather than in the query string. This caused that the selector id was not being found in that handler, avoiding the correct processing of the data.

  The problem has been fixed by retrieving the data to process both from the request parameters and content.

[1] https://code.openbravo.com/erp/devel/pi/rev/2a79f597da83870d152ee3176ffa679a01ac19d5 [^]

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDefaultFilterActionHandler.java
---
(0104560)
hgbot   
2018-05-17 10:30   
Repository: erp/devel/pi
Changeset: 4b209651d928dfccdad27e585bce7c003c7b5fc6
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu May 17 10:28:43 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4b209651d928dfccdad27e585bce7c003c7b5fc6 [^]

related to issue 38548: minor code improvements

  Using the correct alternative when applies:
    - Use isEmpty() to check whether the collection is empty or not
    - Use diamond operator
    - Iterate over the "entrySet" instead of the "keySet"

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDefaultFilterActionHandler.java
---
(0104573)
hgbot   
2018-05-17 18:46   
Repository: erp/devel/pi
Changeset: 22d3347bafe77dcadc2079753b4d3979bbb0eb34
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu May 17 18:44:14 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/22d3347bafe77dcadc2079753b4d3979bbb0eb34 [^]

related to issue 38548: added test case

---
M src-test/src/org/openbravo/test/AllWebserviceTests.java
M src-test/src/org/openbravo/test/datasource/DatasourceTestUtil.java
A src-test/src/org/openbravo/test/selector/TestSelectorDefaultFilterActionHandler.java
---
(0104578)
hudsonbot   
2018-05-17 21:41   
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/4e28963f0fe6 [^]
Maturity status: Test
(0104579)
hudsonbot   
2018-05-17 21:41   
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/4e28963f0fe6 [^]
Maturity status: Test
(0104585)
alostale   
2018-05-18 09:06   
reviewed + tested
(0104620)
hudsonbot   
2018-05-21 18:36   
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/915bf19e1d5b [^]
Maturity status: Test