Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0006152 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] Z. Others | trivial | have not tried | 2008-11-21 16:32 | 2009-04-21 11:04 | |||
Reporter | villind | View Status | public | |||||
Assigned To | Dowid | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | pi | Fixed in SCM revision | 12217 | |||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | PostgreSQL | Java version | ||||
OS Version | Database version | 8.3.5 | Ant version | |||||
Product Version | 2.40 | SCM revision | ||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
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 | 0006152: Alert tule "Products under stock" does not work on Postgresql | |||||||
Description | The alert query has incompatible data types. | |||||||
Steps To Reproduce | Activate the alert "Products under stock", and see the log | |||||||
Proposed Solution | Add to number for '-1' as postgresql is considering this value as integer, not numeric. Fixed version: select p.M_PRODUCT_ID as referencekey_id, p.name as record_id, 0 as ad_role_id, null as ad_user_id, p.name||' with minimun stock '||po.stockmin||' has stocked '|| (select sum(qtyonhand) as QtyStored from m_storage_detail s where s.m_product_id = po.m_product_id and ad_isOrgIncluded(s.ad_org_id,po.ad_org_id,po.ad_client_id)!=to_number(-1)) as description, 'Y' as isActive, 0 as ad_org_id, 0 as ad_client_id, now() as created, 0 as createdBy, now() as updated, 0 as updatedBy from m_product p, m_product_org po where p.m_product_id = po.m_product_id and po.stockmin is not null and po.stockmin > (select sum(qtyonhand) as QtyStored from m_storage_detail s where s.m_product_id = po.m_product_id and ad_isOrgIncluded(s.ad_org_id,po.ad_org_id,po.ad_client_id)!=to_number(-1)) | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0012583) Dowid (viewer) 2009-01-23 17:04 |
The problem is specific to Postgres. The != operator is converted to <> at the parser stage. Error occures if no space between operator != and - So, Select 1!=-1 Error Select 1!= -1 OK but, Select 1<>-1 OK Select 1<> -1 OK |
(0012587) svnbot (viewer) 2009-01-23 17:07 |
Repository: openbravo Revision: 12217 Author: dowid Date: 2009-01-23 17:07:47 +0100 (Fri, 23 Jan 2009) bug fixed 0006152: Alert rule "Products under stock" does not work on Postgresql --- U trunk/src-db/database/sourcedata/AD_ALERTRULE.xml --- https://dev.openbravo.com/websvn/openbravo/?rev=12217&sc=1 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2008-11-21 16:32 | villind | New Issue | |
2008-11-21 16:32 | villind | Assigned To | => rafaroda |
2008-11-21 16:33 | villind | OBNetwork customer | => No |
2008-11-21 16:33 | villind | Regression testing | => No |
2008-11-24 12:55 | rafaroda | Status | new => scheduled |
2008-11-24 12:55 | rafaroda | Assigned To | rafaroda => Dowid |
2008-11-24 12:55 | rafaroda | fix_in_branch | => trunk |
2008-12-02 13:02 | jaimetorre | sf_bug_id | 0 => 2377113 |
2009-01-23 17:04 | Dowid | Note Added: 0012583 | |
2009-01-23 17:07 | svnbot | Checkin | |
2009-01-23 17:07 | svnbot | Note Added: 0012587 | |
2009-01-23 17:07 | svnbot | Status | scheduled => resolved |
2009-01-23 17:07 | svnbot | Resolution | open => fixed |
2009-01-23 17:07 | svnbot | svn_revision | => 12217 |
2009-04-21 11:04 | psarobe | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |