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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0002065
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersminoralways2007-10-09 23:532008-06-12 09:43
ReportercromeroView Statuspublic 
Assigned Tocromero 
PrioritynormalResolutionfixedFixed in Version2.35
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Merge Request Status
Review Assigned To
OBNetwork customerNo
Web browser
ModulesCore
Support ticket
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0002065: Record old is not assigned inserting A_AMORTIZATION

DescriptionInserting an Amortization in Postgre we get this error:
 
14:17:57 [http-8080-Processor9] ERROR org.openbravo.erpWindows.Assets.AssetamortizationData - SQL error in query: INSERT INTO A_Amort
izationline (AD_Org_ID, AD_Client_ID, IsActive, A_Amortization_ID, Line, Amortizationamt, C_Currency_ID, Amortization_Porcentage, A_Am
ortizationline_ID, A_Asset_ID, created, createdby, updated, updatedBy) VALUES (TO_NUMBER(?), TO_NUMBER(?), (?), TO_NUMBER(?), TO_NUMBER
(?), TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?), now(), to_number(?), now(), to_number(?)) Exception:org.postgres
ql.util.PSQLException: ERROR: record "old" is not assigned yet
Detail: The tuple structure of a not-yet-assigned record is indeterminate.
 
14:17:57 [http-8080-Processor9] ERROR org.openbravo.erpWindows.Assets.Assetamortization - Error captured: 0

It looks like an error in the inserting trigger.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0002327)
cromero (viewer)
2007-10-09 23:57
edited on: 2008-06-12 09:22

Logged In: YES
user_id=1500614
Originator: YES

There should be an operation check before the ReadOnly check:

  -- ReadOnly Check
  if(TG_OP = 'UPDATE' or TG_OP = 'DELETE') THEN
    begin
      SELECT processed,
             POSTED
      INTO v_Processed,
        v_Posted
      FROM A_Amortization
      WHERE A_Amortization.A_Amortization_ID=OLD.A_Amortization_ID;
    exception
    when others then
      v_processed:=null;
    end;
  END IF;

This should be fixed in next release
Carlos Romero
Openbravo Team
(0002328)
user71
2007-10-10 08:53
edited on: 2008-06-12 09:22

Logged In: YES
user_id=1815195
Originator: NO

I have found this in A_AMORTIZATIONLINE_TRG function. May I to change something?

-- ReadOnly Check
 IF(TG_OP = 'UPDATE' OR TG_OP = 'DELETE') THEN
    begin
      SELECT MAX(processed),
        MAX(POSTED)
      INTO v_Processed,
        v_Posted
      FROM A_Amortization
      WHERE A_Amortization.A_Amortization_ID=OLD.A_Amortization_ID;
    exception
    when others then
      v_processed:=null;
    end;
  ELSE
    v_Processed:='N';
  END IF;
(0002329)
cromero (viewer)
2007-10-15 12:27
edited on: 2008-06-12 09:22

Logged In: YES
user_id=1500614
Originator: YES

This bug has been fixed and it will be incorporated in next release (2.35).

Carlos Romero
Openbravo Team
(0002330)
rafaroda (viewer)
2007-10-31 12:38
edited on: 2008-06-12 09:22

Logged In: YES
user_id=1892190
Originator: NO

Verification assigned to rafaroda.
(0002331)
rafaroda (viewer)
2007-10-31 12:39
edited on: 2008-06-12 09:22

Logged In: YES
user_id=1892190
Originator: NO

Verification assigned to rafaroda.
(0005654)
user71
2005-06-01 00:00
edited on: 2008-06-12 09:43

This bug was originally reported in SourceForge bug tracker and then migrated to Mantis.

You can see the original bug report in:
https://sourceforge.net/support/tracker.php?aid=1810436 [^]

- Issue History
Date Modified Username Field Change


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker