Openbravo Issue Tracking System - Openbravo ERP | |||||||||||||
View Issue Details | |||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0027452 | Openbravo ERP | 07. Sales management | public | 2014-08-24 13:59 | 2014-08-26 05:18 | ||||||||
Reporter | shuehner | ||||||||||||
Assigned To | AtulOpenbravo | ||||||||||||
Priority | immediate | Severity | major | Reproducibility | have not tried | ||||||||
Status | closed | Resolution | fixed | ||||||||||
Platform | OS | 5 | OS Version | ||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Merge Request Status | |||||||||||||
Review Assigned To | rafaroda | ||||||||||||
OBNetwork customer | No | ||||||||||||
Web browser | |||||||||||||
Modules | Core | ||||||||||||
Support ticket | |||||||||||||
Regression level | Production - QA Approved | ||||||||||||
Regression date | 2014-06-07 | ||||||||||||
Regression introduced in release | 3.0PR14Q3 | ||||||||||||
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/5596aec8b534a9690f16dea0323ff48567daf178 [^] | ||||||||||||
Triggers an Emergency Pack | No | ||||||||||||
Summary | 0027452: Regression in 0026054: c_orderline_trg has invalid sql | ||||||||||||
Description | The c_orderline_trg now has the following sql: 1.24 + SELECT max(m_reservation_id) INTO v_reservation_id 1.25 + FROM m_reservation 1.26 + WHERE c_orderline_id = :OLD.c_orderline_id 1.27 + AND res_status = 'DR' 1.28 + ORDER BY CREATED DESC; Running this with some dummy value for line_id shows it not working by producing following error: ERROR: column "m_reservation.created" must appear in the GROUP BY clause or be used in an aggregate function LINE 5: ORDER BY CREATED DESC; Also the sql does not make much sense functionally as the max will return some reservation id from the lines in the filter at random. If that is fine the order by is not useful. If it is not than the logic is flawed. | ||||||||||||
Steps To Reproduce | Review that change or run it manually i.e. like this: obpi93=# SELECT max(m_reservation_id) INTO v_reservation_id FROM m_reservation WHERE c_orderline_id = 'OLD.c_orderline_id' AND res_status = 'DR' ORDER BY CREATED DESC; ERROR: column "m_reservation.created" must appear in the GROUP BY clause or be used in an aggregate function LINE 5: ORDER BY CREATED DESC; | ||||||||||||
Proposed Solution | |||||||||||||
Additional Information | |||||||||||||
Tags | No tags attached. | ||||||||||||
Relationships |
| ||||||||||||
Attached Files | |||||||||||||
Issue History | |||||||||||||
Date Modified | Username | Field | Change | ||||||||||
2014-08-24 13:59 | shuehner | New Issue | |||||||||||
2014-08-24 13:59 | shuehner | Assigned To | => dmiguelez | ||||||||||
2014-08-24 13:59 | shuehner | OBNetwork customer | => No | ||||||||||
2014-08-24 13:59 | shuehner | Modules | => Core | ||||||||||
2014-08-24 13:59 | shuehner | Regression level | => Production - QA Approved | ||||||||||
2014-08-24 13:59 | shuehner | Regression introduced in release | => 3.0PR14Q3 | ||||||||||
2014-08-24 13:59 | shuehner | Triggers an Emergency Pack | => No | ||||||||||
2014-08-24 14:00 | shuehner | Assigned To | dmiguelez => AtulOpenbravo | ||||||||||
2014-08-24 14:03 | shuehner | Relationship added | caused by 0026054 | ||||||||||
2014-08-24 14:03 | shuehner | Note Added: 0069666 | |||||||||||
2014-08-25 11:15 | AtulOpenbravo | Status | new => scheduled | ||||||||||
2014-08-25 11:15 | AtulOpenbravo | fix_in_branch | => pi | ||||||||||
2014-08-25 11:28 | AtulOpenbravo | Regression date | => 2014-06-07 | ||||||||||
2014-08-25 11:28 | AtulOpenbravo | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/5596aec8b534a9690f16dea0323ff48567daf178 [^] | ||||||||||
2014-08-25 11:28 | AtulOpenbravo | fix_in_branch | pi => | ||||||||||
2014-08-25 13:15 | AtulOpenbravo | Review Assigned To | => rafaroda | ||||||||||
2014-08-25 18:25 | hgbot | Checkin | |||||||||||
2014-08-25 18:25 | hgbot | Note Added: 0069721 | |||||||||||
2014-08-25 18:25 | hgbot | Status | scheduled => resolved | ||||||||||
2014-08-25 18:25 | hgbot | Resolution | open => fixed | ||||||||||
2014-08-25 18:25 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/c020b50ce0fe7115042027947fff24d9fb4165b8 [^] | ||||||||||
2014-08-25 18:42 | rafaroda | Note Added: 0069723 | |||||||||||
2014-08-25 18:42 | rafaroda | Status | resolved => closed | ||||||||||
2014-08-26 05:18 | hudsonbot | Checkin | |||||||||||
2014-08-26 05:18 | hudsonbot | Note Added: 0069737 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|