Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0053578Openbravo ERPA. Platformpublic2023-10-03 11:582023-10-16 10:44
ignacio_deandres 
ignacio_deandres 
normalmajorhave not tried
closedfixed 
5
 
mainPR24Q1 
approved
No
Core
No
0053578: Filter in P&E windows having relevant characteristics and filtering having records selected
Having a P&E window with relevant characteristics, is not possible to filter having records selected. A NullPointerException is thrown in this case.

See attached both an example of the error and the query that is being wrongly built in this case.
0- configure a relevant characteristic[1], for instance colour
1- add the property field pointing to this relevant characteristic in the "Offer Product Selector" window.
2- go to discounts and promotions, open add products
3- select a record and filter

[1] http://wiki.openbravo.com/wiki/How_to_use_product_characteristic_fields#Relevant_characteristics [^]
No tags attached.
txt exception.txt (9,687) 2023-10-03 12:37
https://issues.openbravo.com/file_download.php?file_id=19006&type=bug
txt failingQuery.txt (1,125) 2023-10-03 12:37
https://issues.openbravo.com/file_download.php?file_id=19007&type=bug
Issue History
2023-10-03 11:58ignacio_deandresNew Issue
2023-10-03 11:58ignacio_deandresAssigned To => Triage Platform Base
2023-10-03 11:58ignacio_deandresOBNetwork customer => No
2023-10-03 11:58ignacio_deandresTriggers an Emergency Pack => No
2023-10-03 12:21caristuProjectPOS2 => Openbravo ERP
2023-10-03 12:21caristuModules => Core
2023-10-03 12:21caristuCategoryCore => A. Platform
2023-10-03 12:29hgbotMerge Request Status => open
2023-10-03 12:29hgbotNote Added: 0155423
2023-10-03 12:35caristuSummaryError in the Discounts and Promotions 'add product' functionality when choosing records and filtering. => Filter in P&E windows having relevant characteristics and filtering having records selected
2023-10-03 12:35caristuDescription Updatedbug_revision_view_page.php?rev_id=26933#r26933
2023-10-03 12:35caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=26935#r26935
2023-10-03 12:37caristuFile Added: exception.txt
2023-10-03 12:37caristuFile Added: failingQuery.txt
2023-10-03 12:37caristuAssigned ToTriage Platform Base => ignacio_deandres
2023-10-16 10:16hgbotMerge Request Statusopen => approved
2023-10-16 10:44hgbotNote Added: 0155867
2023-10-16 10:44hgbotResolutionopen => fixed
2023-10-16 10:44hgbotStatusnew => closed
2023-10-16 10:44hgbotFixed in Version => PR24Q1
2023-10-16 10:44hgbotNote Added: 0155868

Notes
(0155423)
hgbot   
2023-10-03 12:29   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1011 [^]
(0155867)
hgbot   
2023-10-16 10:44   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1011 [^]
(0155868)
hgbot   
2023-10-16 10:44   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: b93ddd3b6412681e5802152a5ef593ef0d4c71c3
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 16-10-2023 08:44:23
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/b93ddd3b6412681e5802152a5ef593ef0d4c71c3 [^]

fixes BUG-53578: wrong query with relevant charact and record selection in P&E

  A query with relevant characteristics and an or criteria in the where
clause was being wrongly build, causing a NPE when it was executed.

  This was reproducible having a P&E window showing a relevant
characteristics and after trying to filter having at least one record
selected.

  Now this is fixed by ensuring that the join definition is properly
built also in this case.

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/JoinDefinition.java
---