Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030737Openbravo ERPA. Platformpublic2015-09-02 12:272015-09-14 17:57
shuehner 
alostale 
normalmajorhave not tried
closedfixed 
5
 
3.0PR15Q4 
inigosanchez
Core
No
0030737: New ad_table_navigation_mod_trg is broken for updates (It has wrong coalesce mixing varchar & numeric data)
That trigger is broken and does not work for updates because if has a wrong sql code doing the following:

        COALESCE(NEW.SeqNo , '.') != COALESCE(OLD.SeqNo , '.') OR

Which is mixing numeric column seqno with a varchar '.' which is wrong.

Probably cause copy'n'paste of other text column and then no testing done for the update case of that trigger

ERROR: invalid input syntax for type numeric: "."
  Where: PL/pgSQL function ad_table_navigation_mod_trg() line 66 at IF
Preparation:
On a postgres db
Search for a table having a ad_table_navigation entry or create such an entry for any table.

then without any module in development try to edit in UI the ad_table_navigation entry and check the error message appearing.

No tags attached.
Issue History
2015-09-02 12:27shuehnerNew Issue
2015-09-02 12:27shuehnerAssigned To => platform
2015-09-02 12:27shuehnerModules => Core
2015-09-02 12:27shuehnerTriggers an Emergency Pack => No
2015-09-02 12:27shuehnerSeverityminor => major
2015-09-02 12:29shuehnerNote Added: 0080017
2015-09-02 12:29shuehnerTarget Version => 3.0PR15Q4
2015-09-07 13:05alostaleStatusnew => scheduled
2015-09-07 13:05alostaleAssigned Toplatform => alostale
2015-09-07 13:14alostaleReview Assigned To => inigosanchez
2015-09-07 13:15hgbotCheckin
2015-09-07 13:15hgbotNote Added: 0080189
2015-09-07 13:15hgbotStatusscheduled => resolved
2015-09-07 13:15hgbotResolutionopen => fixed
2015-09-07 13:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a98b85433a15ff3d76ea47fef0dd7992e75a0e3f [^]
2015-09-08 19:28hudsonbotCheckin
2015-09-08 19:28hudsonbotNote Added: 0080249
2015-09-14 17:57inigosanchezNote Added: 0080385
2015-09-14 17:57inigosanchezStatusresolved => closed

Notes
(0080017)
shuehner   
2015-09-02 12:29   
Adding target version Q4 as that is new project merged for Q4 so the error in the project has not been published yet and should be fixed before publishing.
(0080189)
hgbot   
2015-09-07 13:15   
Repository: erp/devel/pi
Changeset: a98b85433a15ff3d76ea47fef0dd7992e75a0e3f
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Sep 07 13:13:46 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a98b85433a15ff3d76ea47fef0dd7992e75a0e3f [^]

fixed bug 30737: broken ad_table_navigation_mod_trg for updates

  ad_table_navigation_mod_trg trigger had a coalesce that was mxing types
  (varchar and numeric) which is not allowed raising an error in when this
  code was exectued.

  Fixed by completely removing this colasce as it was in seqNo column which
  is mandatory.

---
M src-db/database/model/triggers/AD_TABLE_NAVIGATION_MOD_TRG.xml
---
(0080249)
hudsonbot   
2015-09-08 19:28   
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/16e399c2fccf [^]
Maturity status: Test
(0080385)
inigosanchez   
2015-09-14 17:57   
Code reviewed and verified in pi@d45d2896cfa6
Tested in PostgreSQL 9.1.14 & Oracle 11.2