Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0045989 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 00. Application dictionary | major | always | 2021-03-03 13:46 | 2021-03-24 15:56 | |||
Reporter | lbressan | View Status | public | |||||
Assigned To | platform | |||||||
Priority | high | Resolution | fixed | Fixed in Version | PR21Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | pi | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | pi | SCM revision | ||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | Gold | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | 22242 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0045989: Error in the references of type OBUISEL_Selector Reference | |||||||
Description | If the @additional_filters@ constant is missing in custom queries of references of type OBUISEL_Selector Reference, it does not fail to compile but fails to select the selector. The error was detected when migrating from a 19Q version to 20Q4. | |||||||
Steps To Reproduce | Issue preparation: Follow steps 1-4 or install attached module on a Web POS environment 1. In the "Sales Order" window a. create a field in the database and in the application dictionary of type button. 2. Create a "Process Definition" with Standard interface pattern and "Client/Organization" data access. Set any handler. a.Create a "Business Partner" parameter with reference type "OBUISEL_Selector Reference". b.Create a reference of type "OBUISEL_Selector Reference", in the defined selector tab set: 1. Table: Business Partner 2. Template: Selector Template 3. Custom query: yes 4. HQL: select bp.name as name, bp.id as bpid from BusinessPartner bp where bp.employee=true 5.Entity Alias= bp 6.Display Field= name 7.Value Field= id c. assign this reference to the reference of the created parameter 3.assign the process created before to the button created in the "Sales Order" window. 4. Compile: check that no error or warning is displayed about the missing mandatory constant "@additional_filters@". Reproducing the issue: 5. Open the "Sales Order" window, click on the new orange button. 6. open the file openbravo.log 7. click on the created selector 8. view errors in the log: 2021-03-03 09:17:43,168 [http-nio-8080-exec-7] ERROR org.openbravo.service.datasource.DataSourceServlet - Could not locate named parameter [clients], expecting one of [] java.lang.IllegalArgumentException: Could not locate named parameter [clients], expecting one of [] at org.hibernate.query.internal.ParameterMetadataImpl.getNamedParameterDescriptor(ParameterMetadataImpl.java:229) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final] at org.hibernate.query.internal.ParameterMetadataImpl.getQueryParameter(ParameterMetadataImpl.java:198) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final] at org.hibernate.query.internal.QueryParameterBindingsImpl.resolveQueryParameter(QueryParameterBindingsImpl.java:460) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final] at org.hibernate.query.internal.QueryParameterBindingsImpl.getQueryParameterListBinding(QueryParameterBindingsImpl.java:450) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final] at org.hibernate.query.internal.AbstractProducedQuery.setParameterList(AbstractProducedQuery.java:614) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final] | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() ![]() | |||||||
![]() |
|
![]() |
|
(0126761) hgbot (developer) 2021-03-17 15:59 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/331 [^] |
(0126891) hgbot (developer) 2021-03-24 15:56 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: 9383e78b5d017f567a1baeaf45f989d4abdbba43 Author: Augusto Mauch <augusto.mauch@openbravo.com> Date: 2021-03-24T15:52:22+01:00 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/9383e78b5d017f567a1baeaf45f989d4abdbba43 [^] Fixes BUG-45989: hql of selectors must include @additional_filters@ placeholder This placeholder is needed because it is replaced in runtime with a client filter. An event handler has been added to ensure new selecters are defined properly, and a check has been added on ViewManager that will throw an error when loading a window that references a selector with an invalid HQL query --- A modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorEventHandler.java M modules/org.openbravo.client.application/src/org/openbravo/client/application/ViewComponent.java M modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MESSAGE.xml --- |
(0126892) hgbot (developer) 2021-03-24 15:56 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/331 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2021-03-03 13:46 | lbressan | New Issue | |
2021-03-03 13:46 | lbressan | Assigned To | => platform |
2021-03-03 13:46 | lbressan | File Added: example images.zip | |
2021-03-03 13:46 | lbressan | OBNetwork customer | => Gold |
2021-03-03 13:46 | lbressan | Modules | => Core |
2021-03-03 13:46 | lbressan | Support ticket | => 22242 |
2021-03-03 13:46 | lbressan | Triggers an Emergency Pack | => No |
2021-03-03 13:59 | lbressan | Type | defect => feature request |
2021-03-03 14:27 | lbressan | Type | feature request => defect |
2021-03-03 14:32 | lbressan | Resolution time | => 1616540400 |
2021-03-04 14:15 | AugustoMauch | File Added: com.nna.openbravo.retail.testing.zip | |
2021-03-04 14:16 | AugustoMauch | Steps to Reproduce Updated | View Revisions |
2021-03-04 14:18 | AugustoMauch | Steps to Reproduce Updated | View Revisions |
2021-03-17 15:59 | hgbot | Merge Request Status | => open |
2021-03-17 15:59 | hgbot | Note Added: 0126761 | |
2021-03-23 19:20 | hgbot | Merge Request Status | open => approved |
2021-03-23 19:21 | hgbot | Merge Request Status | approved => open |
2021-03-24 14:11 | hgbot | Merge Request Status | open => approved |
2021-03-24 15:56 | hgbot | Resolution | open => fixed |
2021-03-24 15:56 | hgbot | Status | new => closed |
2021-03-24 15:56 | hgbot | Fixed in Version | => PR21Q2 |
2021-03-24 15:56 | hgbot | Note Added: 0126892 | |
2021-03-24 15:56 | hgbot | Note Added: 0126891 |
Copyright © 2000 - 2009 MantisBT Group |