Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0047840 | Openbravo ERP | 09. Financial management | public | 2021-10-13 13:01 | 2021-10-14 09:53 |
|
Reporter | fernando_merino | |
Assigned To | fernando_merino | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0047840: API Change: Change DESCRIPTION column from VARCHAR to NVARCHAR type in FIN_PAYMENT table |
Description | This problem occurs only on an Oracle database. The problem is that the DESCRIPTION column is defined as VARCHAR2(255 BYTE). The DESCRIPTION field is limited to 255 CHARACTERS long, so if all these characters don't exceed the limit of 255 BYTES there is no problem (e.g 255 characters of 1 BYTE each). The problem comes when the description contains special characters larger than 1 BYTE. If the description is a long one, for example one with 255 characters, the characters limit is not exceeded, but if it contains some characters larger than 1 BYTE, like for example the º character that occupies 2 BYTES, then the limit of 255 BYTES is exceeded (254 one-byte characters, plus one of 2 bytes make 256 bytes, which do not fit in the field defined in the database). |
Steps To Reproduce | Using Oracle database:
1. Go to 'Payment in', window which makes use of FIN_PAYMENT table.
2. Create a new record and in the DESCRIPTION field input a long description reaching the limit of 255 characters and containing some characters larger than 1 BYTE, like for example the º characters. Try with this description for example --> 'This is a description example:ººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººº'
3. Try to save the record, you will get an error similar to this one: ERROR: Saving failed. ORA-12899: value too large for column "ERP_PI_ORACLE"."FIN_PAYMENTMETHOD"."DESCRIPTION" (actual: 480, maximum: 255) |
Proposed Solution | 1. Change column type of the DESCRIPTION field from VARCHAR to NVARCHAR
(Risk statement --> See notes) |
Additional Information | |
Tags | Approved |
Relationships | blocks | defect | 0047765 | | closed | fernando_merino | Problem posting multiple invoices in the same collection |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2021-10-13 13:01 | fernando_merino | New Issue | |
2021-10-13 13:01 | fernando_merino | Assigned To | => dmitry_mezentsev |
2021-10-13 13:01 | fernando_merino | Modules | => Core |
2021-10-13 13:01 | fernando_merino | Triggers an Emergency Pack | => No |
2021-10-13 13:02 | fernando_merino | Note Added: 0132316 | |
2021-10-13 13:03 | fernando_merino | Relationship added | blocks 0047765 |
2021-10-13 13:45 | dmitry_mezentsev | Tag Attached: Approved | |
2021-10-13 13:45 | dmitry_mezentsev | Assigned To | dmitry_mezentsev => fernando_merino |
2021-10-14 09:40 | hgbot | Note Added: 0132337 | |
2021-10-14 09:53 | hgbot | Resolution | open => fixed |
2021-10-14 09:53 | hgbot | Status | new => closed |
2021-10-14 09:53 | hgbot | Note Added: 0132341 | |
2021-10-14 09:53 | hgbot | Note Added: 0132342 | |
Notes |
|
(0132316)
|
fernando_merino
|
2021-10-13 13:02
|
|
API change risk:
Risk --> small
- NVARCHAR is going to support the same data that VARCHAR was supporting. 255 characters will
continue to be the characters limit, but now special characters are allowed in long descriptions
reaching this characters limit.
- JAVA API doesn't change, the property of the DAL object will continue being treated as String type.
- Only instances using Oracle database could be affected
- Additionally, the api-check considers this change as a warning. This is the result:
[checkAPI] 11451 [main] WARN org.openbravo.ddlutils.task.CheckAPIDistribution - +++++++++++++++++++++++++++++++++++++++++++++++++++
[checkAPI] 11452 [main] WARN org.openbravo.ddlutils.task.CheckAPIDistribution - Warnings in API model validation
[checkAPI] 11452 [main] WARN org.openbravo.ddlutils.task.CheckAPIDistribution - +++++++++++++++++++++++++++++++++++++++++++++++++++
[checkAPI] 11452 [main] WARN org.openbravo.ddlutils.task.CheckAPIDistribution - Column type change from VARCHAR to NVARCHAR: column:FIN_PAYMENT.DESCRIPTION
[checkAPI] 11452 [main] WARN org.openbravo.ddlutils.task.CheckAPIDistribution - |
|
|
(0132337)
|
hgbot
|
2021-10-14 09:40
|
|
|
|
(0132341)
|
hgbot
|
2021-10-14 09:53
|
|
|
|
(0132342)
|
hgbot
|
2021-10-14 09:53
|
|
|