Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027452
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajorhave not tried2014-08-24 13:592014-08-26 05:18
ReportershuehnerView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionc020b50ce0fe
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Torafaroda
Web browser
ModulesCore
Regression levelProduction - QA Approved
Regression date2014-06-07
Regression introduced in release3.0PR14Q3
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/5596aec8b534a9690f16dea0323ff48567daf178 [^]
Triggers an Emergency PackNo
Summary

0027452: Regression in 0026054: c_orderline_trg has invalid sql

DescriptionThe 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 ReproduceReview 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;

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by defect 0026054 closedrafaroda Modules Reservations are not deleted 

-  Notes
(0069666)
shuehner (administrator)
2014-08-24 14:03

Found using plpgsql_check
(0069721)
hgbot (developer)
2014-08-25 18:25

Repository: erp/devel/pi
Changeset: c020b50ce0fe7115042027947fff24d9fb4165b8
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Aug 25 16:24:51 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/c020b50ce0fe7115042027947fff24d9fb4165b8 [^]

Fixes Issue 27452:Regression in 0026054: c_orderline_trg has invalid sql

---
M src-db/database/model/triggers/C_ORDERLINE_TRG.xml
---
(0069723)
rafaroda (developer)
2014-08-25 18:42

Verified that Picking List is not created for products without stock but you are able to reactivate the order and change the product to generate full Picking List and Stock Reservations: see screenshots at https://drive.google.com/folderview?id=0B649lz4ZYJcHNWtVaU9jSjdNVWM&usp=sharing [^]

Also verified that fix for related issue 0026054 is now working properly on PostgreSQL.
(0069737)
hudsonbot (developer)
2014-08-26 05:18

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/de09123fc129 [^]
Maturity status: Test

- 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 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker