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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032461
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts and Promotionsmajoralways2016-03-11 12:312016-03-18 15:29
ReportermalsasuaView Statuspublic 
Assigned Tojorge-garcia 
PriorityimmediateResolutionfixedFixed in VersionRR16Q2
StatusclosedFix in branchFixed in SCM revision41e788c55a5a
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionpiSCM revision 
Merge Request Status
Review Assigned Tomarvintm
OBNetwork customerOBPS
Support ticket
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0032461: Database discounts functions are wrong defined: exception are not managed

DescriptionThe database discounts functions (for example: https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/file/1ab09dd431c2/src-db/database/model/functions/OBDISC_XY_GIFT.xml [^]) are not managing the exceptions
Steps To Reproduce- Launch a Oracle instance
  1) Go to ERP
  2) Navigate to window Discounts and Promotions
  3) Select record Big Lantern -> gift small one, and go to Product tab
  4) Uncheck Gift Product checkbox from Torch mini record and save it
  5) Go to Sales Order window
  6) Create a sale with lines:
   --> Line 1: Basecamp lantern, qty 1
   --> Line 2: Torch mini, qty 1
  7) Save the sales order and tap Book button
  8) Select book, and click button OK.
  9) Check a "no data found" error is raised.

- Try steps 1 to 8 in a postgres instance and check that in step 9, no error is raised.
Proposed Solutioncode of type:

EXCEPTION
WHEN OTHERS THEN
  v_ResultStr:= '@ERROR=' || SQLERRM;
  RAISE NOTICE '%',v_ResultStr ;
  -- ROLLBACK;
  IF(p_PInstance_ID IS NOT NULL) THEN
    PERFORM AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
  END IF;
-- RAISE EXCEPTION '%', v_ResultStr ; --OBTG:-20100--


should be added to the function

It is needed to review also other functions on the module.
TagsNo tags attached.
Attached Filesdiff file icon buyXgiftYfix.diff [^] (700 bytes) 2016-03-16 15:49 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0085222)
hgbot (developer)
2016-03-18 11:52

Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 41e788c55a5a011d69369812c9fa10bf4e23522b
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Mar 15 17:48:20 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/41e788c55a5a011d69369812c9fa10bf4e23522b [^]

Fixed issue 32461: Database discounts functions are wrong defined: exception
are not managed

The problem in this case is that in Oracle a exception is raised, and in
Postgres no exception is raised.

The solution is to manage exceptions in this function, either in Postgres and
Oracle.

---
M src-db/database/model/functions/OBDISC_XY_GIFT.xml
---

- Issue History
Date Modified Username Field Change
2016-03-11 12:31 malsasua New Issue
2016-03-11 12:31 malsasua Assigned To => Retail
2016-03-11 12:31 malsasua OBNetwork customer => Yes
2016-03-11 12:31 malsasua Triggers an Emergency Pack => No
2016-03-11 13:00 egoitz Resolution time => 1427839200
2016-03-11 13:00 egoitz Severity minor => major
2016-03-11 13:00 egoitz Proposed Solution updated
2016-03-11 14:00 Orekaria Status new => acknowledged
2016-03-14 15:54 marvintm Resolution time 1427839200 => 1459461600
2016-03-15 08:55 egoitz Resolution time 1459461600 => 1458169200
2016-03-15 08:55 egoitz Priority high => immediate
2016-03-15 11:07 jorge-garcia Status acknowledged => scheduled
2016-03-15 11:07 jorge-garcia Assigned To Retail => jorge-garcia
2016-03-15 17:41 jorge-garcia Steps to Reproduce Updated View Revisions
2016-03-16 15:49 jorge-garcia File Added: buyXgiftYfix.diff
2016-03-18 11:52 hgbot Checkin
2016-03-18 11:52 hgbot Note Added: 0085222
2016-03-18 11:52 hgbot Status scheduled => resolved
2016-03-18 11:52 hgbot Resolution open => fixed
2016-03-18 11:52 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/41e788c55a5a011d69369812c9fa10bf4e23522b [^]
2016-03-18 15:29 marvintm Review Assigned To => marvintm
2016-03-18 15:29 marvintm Status resolved => closed
2016-03-18 15:29 marvintm Fixed in Version => RR16Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker