Openbravo Issue Tracking System - Retail Modules
View Issue Details
0027048Retail ModulesWeb POSpublic2014-07-10 21:172015-03-18 11:37
dbaz 
Osmany 
highmajoralways
closedfixed 
5
 
RR15Q2 
malsasua
No
0027048: [UX] "Brand" button behavior in SEARCH component is not consistent
The behavior of the "Brand" button filter in the SEARCH component is not consistent.

As the other filter buttons, it should dissapear if it cannot finetune more the search.
Login into the webpos as "demouser"

Go to "SEARCH" panel

As you can see, the following buttons are there:

* Brand
* Battery Life
* Capacity
* Color
* Construction
* Dimension
* Dynafit System
* Material
* Object
* Price
* Range
* Size
* Turn Radius
* Use
* Weight

Tap "Brand" filter button and select "Scarpa"

As you can see, all the buttons remain there, where it only should remain
* Brand (in yellow)
* Price
* Use
* Object
* Turn Radius
* Weight
* Dynafit System
because they are only the ones that can finetune more the search.


I know that the problem probably come because in the backend "Brand" is pointing to a different table than the other product characteristics, but for the user this should be transparent and all filter buttons should behave in the same way
No tags attached.
related to defect 00280473.0PR15Q1 closed NaroaIriarte Openbravo ERP Log shows error which is actively (and correctly ignored) in AdvancedQueryBuilder, prevent this exception from showing 
blocks feature request 0028933RR16Q1 closed Retail Retail Modules QA: RR15Q2: Add tests for Mobile applications 
blocks defect 0029271 closed Osmany Retail Modules [UX] When searching for product characteristics, the loading picture is transparent 
blocks defect 0029272 closed aaroncalero Retail Modules When deselecting more than 1 characteristic, 1 remains selected 
diff Issue27048.diff (1,573) 2015-03-11 13:59
https://issues.openbravo.com/file_download.php?file_id=7884&type=bug
Issue History
2014-07-10 21:17dbazNew Issue
2014-07-10 21:17dbazAssigned To => marvintm
2014-07-10 21:17dbazTriggers an Emergency Pack => No
2014-07-10 22:25dbazSummary"Brand" button behavior in SEARCH component is not consistent => [UX] "Brand" button behavior in SEARCH component is not consistent
2015-03-10 21:52hgbotCheckin
2015-03-10 21:52hgbotNote Added: 0075423
2015-03-10 21:52hgbotStatusnew => resolved
2015-03-10 21:52hgbotResolutionopen => fixed
2015-03-10 21:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/784e15101c7ca97a8ce7fb85a059f735bb1489cf [^]
2015-03-10 21:53OsmanyAssigned Tomarvintm => Osmany
2015-03-11 07:30mtaalNote Added: 0075434
2015-03-11 07:30mtaalStatusresolved => new
2015-03-11 07:30mtaalResolutionfixed => open
2015-03-11 07:32hgbotCheckin
2015-03-11 07:32hgbotNote Added: 0075435
2015-03-11 13:59aaroncaleroFile Added: Issue27048.diff
2015-03-11 14:00aaroncaleroNote Added: 0075448
2015-03-11 16:35hgbotCheckin
2015-03-11 16:35hgbotNote Added: 0075452
2015-03-11 16:35hgbotStatusnew => resolved
2015-03-11 16:35hgbotResolutionopen => fixed
2015-03-11 16:35hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/784e15101c7ca97a8ce7fb85a059f735bb1489cf [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cff55574b2cafaa7b92a8ca9408fc9a727ba7c55 [^]
2015-03-13 13:01OrekariaRelationship addedblocks 0028933
2015-03-13 13:22OrekariaRelationship addedblocks 0029171
2015-03-13 13:22OrekariaRelationship deletedblocks 0029171
2015-03-13 13:22OrekariaRelationship addedblocks 0029271
2015-03-13 13:28OrekariaRelationship addedblocks 0029272
2015-03-13 13:50OrekariaNote Added: 0075560
2015-03-13 13:50OrekariaNote Added: 0075561
2015-03-13 13:50OrekariaStatusresolved => new
2015-03-13 13:50OrekariaResolutionfixed => open
2015-03-13 13:50OrekariaNote Deleted: 0075560
2015-03-13 15:40OsmanyNote Added: 0075574
2015-03-13 15:46OrekariaRelationship addedrelated to 0028047
2015-03-18 11:33malsasuaStatusnew => scheduled
2015-03-18 11:37malsasuaNote Added: 0075728
2015-03-18 11:37malsasuaStatusscheduled => resolved
2015-03-18 11:37malsasuaFixed in Version => RR15Q2
2015-03-18 11:37malsasuaResolutionopen => fixed
2015-03-18 11:37malsasuaReview Assigned To => malsasua
2015-03-18 11:37malsasuaStatusresolved => closed

Notes
(0075423)
hgbot   
2015-03-10 21:52   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 784e15101c7ca97a8ce7fb85a059f735bb1489cf
Author: Osmany Garcia Machado <osmany.machado <at> peoplewalking.com>
Date: Tue Mar 10 14:51:04 2015 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/784e15101c7ca97a8ce7fb85a059f735bb1489cf [^]

Fixed issue 27048: [UX] Brand button behavior in SEARCH component is not consistent.

---
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js
---
(0075434)
mtaal   
2015-03-11 07:30   
The changeset causes the module build to fail when the complementary product module is installed.

I added a console.log statement which shows the resulting query, apparently it has a parameter ? which is not handled here. Maybe an additional change is needed in the complementary product module.

select distinct(characteristic_id), _identifier from m_product_ch as prod_ch where exists (select * from m_product as product where isGeneric = 'false' and prod_ch.m_product = product.m_product_id) order by UPPER(_identifier) asc
4b62aabe0fd21745a2c88f882c5a841c_WebPOS.js:15615 select distinct(characteristic_id), _identifier from m_product_ch as prod_ch where exists (select * from m_product as product where isGeneric = 'false' and prod_ch.m_product = product.m_product_id) order by UPPER(_identifier) asc
4b62aabe0fd21745a2c88f882c5a841c_WebPOS.js:15615 select distinct(characteristic_id), _identifier from m_product_ch as prod_ch where exists (select * from m_product as product where isGeneric = 'false' and exists (select * from obrecp_complementaryproduct as complementary where complementary.complementary_product_id = product.m_product_id and complementary.product_id = ?) and prod_ch.m_product = product.m_product_id) order by UPPER(_identifier) asc
4b62aabe0fd21745a2c88f882c5a841c_WebPOS.js:7523 found 14 ids of 1476 that are not valid for unit tests. execute printUntesteableIds() to get the list
; line: scan (http://127.0.0.1:8080/openbravo/web/js/gen/4b62aabe0fd21745a2c88f882c5a841c_WebPOS.js:6438:10 [^]) (*,+)
4b62aabe0fd21745a2c88f882c5a841c_WebPOS.js:1352 OB.Dal.query: table 'ProductCharacteristic'; {"message":"number of '?'s in statement string does not match argument count","code":5}; http://127.0.0.1:8080/openbravo/web/js/gen/4b62aabe0fd21745a2c88f882c5a841c_WebPOS.js:1790:11 [^]
4b62aabe0fd21745a2c88f882c5a841c_WebPOS.js:7527 OBDAL error: undefined; line: Object.OB.UTIL.showError

I will rollback the change as it breaks the build.
(0075435)
hgbot   
2015-03-11 07:32   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 2af5438bbe03c64e23bff52c755010b5ddc5a409
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Mar 11 07:32:41 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2af5438bbe03c64e23bff52c755010b5ddc5a409 [^]

Related to issue 27048: [UX] Brand button behavior in SEARCH component is not consistent.
Backout from changeset as it does not work in combination with complementary product module.

Also needed to add a ; to pass jslint checking.

---
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js
---
(0075448)
aaroncalero   
2015-03-11 14:00   
Attached diff file with the original fix plus the fix of the unhandled parameter
(0075452)
hgbot   
2015-03-11 16:35   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: cff55574b2cafaa7b92a8ca9408fc9a727ba7c55
Author: Osmany Garcia Machado <osmany.machado <at> peoplewalking.com>
Date: Wed Mar 11 09:34:46 2015 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cff55574b2cafaa7b92a8ca9408fc9a727ba7c55 [^]

Fixed issue 27048: The diff provided by Aaron and changed the declaration the customParams variable out if.

---
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js
---
(0075561)
Orekaria   
2015-03-13 13:50   
There are still some characteristics being shown

In 'brand', select 'Scarpa'
In 'Material', select 'Aluminium'
Verify that there is no product matching the filter
(0075574)
Osmany   
2015-03-13 15:40   
This the expected behavior. The behavior was changed in this issues:

https://issues.openbravo.com/view.php?id=27047 [^]
(0075728)
malsasua   
2015-03-18 11:37   
Change the selector to adapt it to the product characteristics will affect to the performance, by this reason, will not do it.
By other way, there is a project to do the refactor of the selectors, and this casuistic will be adapted in this refactor