Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027434Openbravo ERP09. Financial managementpublic2014-08-23 14:142014-10-16 10:37
shuehner 
shuehner 
normaltrivialhave not tried
closedfixed 
5
 
 
eduardo_Argal
Core
No
0027434: Delete c_dp_managementline_trg as it is useless
This trigger is run on insert + updates.
But only has code for insert.

All it's code is inside (new:status_from IS NULL).

However that column status_from is table c_dp_managementline is defined as 'not null'

So none of that code is ever run.

NOTE: This table is related to 'Old-flow' so in normal operation not even used.
Review code of that trigger and compare to table definition
Just delete the whole trigger.
No tags attached.
Issue History
2014-08-23 14:14shuehnerNew Issue
2014-08-23 14:14shuehnerAssigned To => dmiguelez
2014-08-23 14:14shuehnerModules => Core
2014-08-23 14:14shuehnerTriggers an Emergency Pack => No
2014-08-23 14:21shuehnerRelationship addedrelated to 0027435
2014-09-03 13:57eduardo_ArgalAssigned Todmiguelez => shuehner
2014-10-07 18:26shuehnerReview Assigned To => eduardo_Argal
2014-10-08 12:45hgbotCheckin
2014-10-08 12:45hgbotNote Added: 0070805
2014-10-08 12:45hgbotStatusnew => resolved
2014-10-08 12:45hgbotResolutionopen => fixed
2014-10-08 12:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f65eeca4b22845d2f65ed92f83cf7b2f488e8f9b [^]
2014-10-16 10:37eduardo_ArgalNote Added: 0070985
2014-10-16 10:37eduardo_ArgalStatusresolved => closed

Notes
(0070805)
hgbot   
2014-10-08 12:45   
Repository: erp/devel/pi
Changeset: f65eeca4b22845d2f65ed92f83cf7b2f488e8f9b
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Tue Oct 07 18:25:57 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f65eeca4b22845d2f65ed92f83cf7b2f488e8f9b [^]

Fixed 27434. Deleted useless trigger C_DP_MANAGEMENTLINE_TRG.
All code for this trigger is inside an if :new.status_from == null check
Checking definition of that status_from column in the c_dp_managementline table
shows that it is defined as not null (as has been since hg revision 0).

So that condition can never be true so all the trigger is not useful.

---
R src-db/database/model/triggers/C_DP_MANAGEMENTLINE_TRG.xml
---
(0070985)
eduardo_Argal   
2014-10-16 10:37   
Reviewed and closed