Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0027453 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 08. Project and service management | minor | have not tried | 2014-08-24 14:08 | 2015-09-15 15:56 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | AtulOpenbravo | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | bb2a1e390853 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | dmiguelez | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0027453: pl function c_project_generate has broken sql | |||||||
Description | This functions contains the following sql: 182 SELECT COALESCE(MAX(C_UOM_ID), '100'), 183 MAX(C_Tax_ID) -- UOM 100=EA 184 INTO v_C_UOM_ID, 185 v_C_Tax_ID 186 FROM M_PRODUCT p, 187 C_TAX t 188 WHERE P.C_TaxCategory_ID=t.C_TaxCategory_ID 189 AND P.M_Product_ID=CUR_PLines.M_Product_ID 190 ORDER BY t.IsDefault DESC; Note: line numbers as per \sf+ c_project_generate This sql is broken as leads to the following error when executed 'with some random product': obpi93=# SELECT COALESCE(MAX(C_UOM_ID), '100'), MAX(C_Tax_ID) -- UOM 100=EA FROM M_PRODUCT p, C_TAX t WHERE P.C_TaxCategory_ID=t.C_TaxCategory_ID AND P.M_Product_ID='0DC5C5281B3643DEAB978EB04139516B' ORDER BY t.IsDefault DESC; ERROR: column "t.isdefault" must appear in the GROUP BY clause or be used in an aggregate function LINE 7: ORDER BY t.IsDefault DESC; Note: This code seems to be unchanged since hg-revision 0 (from 2007) Note: similar bug technically as in 27452. That sql also functionally is questionable as either the order by is useless or the code is functionally wrong. | |||||||
Steps To Reproduce | Review code & or run that sql snipped | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0069667) shuehner (administrator) 2014-08-24 14:08 |
Found using plpgsql_check |
(0080377) hgbot (developer) 2015-09-14 16:57 |
Repository: erp/devel/pi Changeset: bb2a1e39085308d1688052d6da4ee958b663ea01 Author: Atul Gaware <atul.gaware <at> openbravo.com> Date: Tue Jul 21 11:02:59 2015 +0530 URL: http://code.openbravo.com/erp/devel/pi/rev/bb2a1e39085308d1688052d6da4ee958b663ea01 [^] Fixes Issue 27453:pl function c_project_generate has broken sql Inorder to give first preference to default taxes defined under tax category used in product, group by isdefault column is added so that result set could be sorted using isdefault in descending order. Loop is provided to handle more than one row. --- M src-db/database/model/functions/C_PROJECT_GENERATE.xml --- |
(0080378) dmiguelez (viewer) 2015-09-14 16:58 |
Code Review + Testing Ok |
(0080404) hudsonbot (viewer) 2015-09-15 15:56 |
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/27462487da9b [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2014-08-24 14:08 | shuehner | New Issue | |
2014-08-24 14:08 | shuehner | Assigned To | => dmiguelez |
2014-08-24 14:08 | shuehner | OBNetwork customer | => No |
2014-08-24 14:08 | shuehner | Modules | => Core |
2014-08-24 14:08 | shuehner | Triggers an Emergency Pack | => No |
2014-08-24 14:08 | shuehner | Note Added: 0069667 | |
2014-08-24 14:09 | shuehner | Description Updated | View Revisions |
2014-09-03 14:02 | eduardo_Argal | Assigned To | dmiguelez => eduardo_Argal |
2015-07-21 07:12 | AtulOpenbravo | Assigned To | eduardo_Argal => AtulOpenbravo |
2015-07-21 07:12 | AtulOpenbravo | Status | new => scheduled |
2015-09-14 16:57 | hgbot | Checkin | |
2015-09-14 16:57 | hgbot | Note Added: 0080377 | |
2015-09-14 16:57 | hgbot | Status | scheduled => resolved |
2015-09-14 16:57 | hgbot | Resolution | open => fixed |
2015-09-14 16:57 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/bb2a1e39085308d1688052d6da4ee958b663ea01 [^] |
2015-09-14 16:58 | dmiguelez | Review Assigned To | => dmiguelez |
2015-09-14 16:58 | dmiguelez | Note Added: 0080378 | |
2015-09-14 16:58 | dmiguelez | Status | resolved => closed |
2015-09-15 15:56 | hudsonbot | Checkin | |
2015-09-15 15:56 | hudsonbot | Note Added: 0080404 |
Copyright © 2000 - 2009 MantisBT Group |