Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0045425 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2020-11-11 14:19 | 2020-11-12 10:11 | |||
Reporter | cberner | View Status | public | |||||
Assigned To | cberner | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | PR21Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0045425: ParametersActionHandler.onSave is not embedding parameters using OBCriteria | |||||||
Description | ParametersActionHandler.onSave method is embedding parameters directly in the OBQuery HQL where clause, it should instead use OBCriteria. Relevant code: OBQuery<ParameterValue> obq = OBDal.getInstance() .createQuery(ParameterValue.class, dbFilterProperty + " = :filter and parameter = :param") | |||||||
Steps To Reproduce | In description. | |||||||
Proposed Solution | Use OBCriteria instead. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0124281) hgbot (developer) 2020-11-11 14:23 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/224 [^] |
(0124282) cberner (developer) 2020-11-11 14:25 |
Test Plan: 1. Login 2. Add a new widget(User Defined HTML Widget) from left panel. 3. Complete fields and save, this will trigger the modified query. |
(0124302) hgbot (developer) 2020-11-12 10:11 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/224 [^] |
(0124303) hgbot (developer) 2020-11-12 10:11 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: a422ed1ff10a79c4089ef78913da2ad5643cef77 Author: Cristian Berner <cristian.berner@openbravo.com> Date: 2020-11-12T09:10:53+00:00 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/a422ed1ff10a79c4089ef78913da2ad5643cef77 [^] Fixes ISSUE-45425: ParametersActionHandler.onSave is embedding parameters wrongly ParametersActionHandler.onSave method is embedding parameters directly in the OBQuery HQL where clause. This fixes it by using OBCriteria instead, which is also safer. Also a minor refactor has been done: * f assignment was unneded, we only care about the exception * use proxies instead of retrieving the object from db. They are used only to check id, there is no need to retrieve it from db, we don't care at this stage if the row is even present in db, filter will return empty if so. * parameterize log --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/ParametersActionHandler.java --- |
Issue History | |||
Date Modified | Username | Field | Change |
2020-11-11 14:19 | cberner | New Issue | |
2020-11-11 14:19 | cberner | Assigned To | => cberner |
2020-11-11 14:19 | cberner | Modules | => Core |
2020-11-11 14:19 | cberner | Triggers an Emergency Pack | => No |
2020-11-11 14:22 | cberner | Relationship added | related to 0038136 |
2020-11-11 14:23 | hgbot | Note Added: 0124281 | |
2020-11-11 14:25 | cberner | Note Added: 0124282 | |
2020-11-12 10:11 | hgbot | Resolution | open => fixed |
2020-11-12 10:11 | hgbot | Status | new => closed |
2020-11-12 10:11 | hgbot | Note Added: 0124302 | |
2020-11-12 10:11 | hgbot | Fixed in Version | => PR21Q1 |
2020-11-12 10:11 | hgbot | Note Added: 0124303 |
Copyright © 2000 - 2009 MantisBT Group |