Openbravo Issue Tracking System - Modules
View Issue Details
0029984ModulesSEPA Credit Transfer Customer-to-Bankpublic2015-05-22 14:242015-05-28 09:56
ngarcia 
jorge-garcia 
urgentmajoralways
closedfixed 
5
 
 
vmromanos
36154
OBPS
0029984: Bank Instruction description's last character is removed when adding it to the ustrd field
Bank Instruction description's last character is removed when adding it to the ustrd field
As group admin role:
   Create a Remittance with Remittance type "SEPA Credit Transfer Customer-to-Bank (pain.001.001.03)" and process it
   Check a Bank Instructions record has a description and if not add it
   Create Remittance File and check the last character is removed from that description
   Repeat the process with "SEPA Credit Transfer Customer-to-Bank (pain.001.001.04)" and check the same problem happens
The problem is in the following code of the CreditTransfer.java file:

          remInfo7.getUstrd()
              .add(
                  parseText(line.getDescription().substring(
                      0,
                      line.getDescription().length() > 140 ? 139
                          : line.getDescription().length() - 1)));
No tags attached.
related to defect 0029983 closed jorge-garcia Bank Instruction description's last character is removed when adding it to the ustrd field 
Issue History
2015-05-22 14:24ngarciaNew Issue
2015-05-22 14:24ngarciaAssigned To => Triage Finance
2015-05-22 14:24ngarciaSupport ticket => 36154
2015-05-22 14:24ngarciaOBNetwork customer => Yes
2015-05-22 14:24ngarciaIssue generated from0029983
2015-05-22 14:25ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8645#r8645
2015-05-22 14:25ngarciaIssue Monitored: networkb
2015-05-22 14:29ngarciaResolution time => 1435269600
2015-05-22 14:29ngarciaProposed Solution updated
2015-05-22 14:31ngarciaRelationship addedrelated to 0029983
2015-05-27 15:31jorge-garciaNote Added: 0077809
2015-05-27 15:32jorge-garciaStatusnew => scheduled
2015-05-27 15:32jorge-garciaAssigned ToTriage Finance => jorge-garcia
2015-05-28 09:54hgbotCheckin
2015-05-28 09:54hgbotNote Added: 0077856
2015-05-28 09:54hgbotStatusscheduled => resolved
2015-05-28 09:54hgbotResolutionopen => fixed
2015-05-28 09:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.sepa.iso20022.credittransfer.customertobank/rev/6aaf6bcd45b0600fd64ad922a6b3b866651e207d [^]
2015-05-28 09:56vmromanosReview Assigned To => vmromanos
2015-05-28 09:56vmromanosNote Added: 0077857
2015-05-28 09:56vmromanosStatusresolved => closed

Notes
(0077809)
jorge-garcia   
2015-05-27 15:31   
Test Plan

As group admin role:
   Create a Remittance with Remittance type "SEPA Credit Transfer Customer-to-Bank (pain.001.001.03)" and process it
   Check a Bank Instructions record has a description and if not add it (to check properly, try with a description with less than 140, more than 140 and exactly 140 characters).
   Create Remittance File and check the description is filled correctly.
   Repeat the process with "SEPA Credit Transfer Customer-to-Bank (pain.001.001.04)" and check the the description is filled correctly.
(0077856)
hgbot   
2015-05-28 09:54   
Repository: erp/pmods/org.openbravo.sepa.iso20022.credittransfer.customertobank
Changeset: 6aaf6bcd45b0600fd64ad922a6b3b866651e207d
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed May 27 15:24:43 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.sepa.iso20022.credittransfer.customertobank/rev/6aaf6bcd45b0600fd64ad922a6b3b866651e207d [^]

Fixed issue 29984: Bank Instruction description's last character is removed

Bank Instruction description's last character is removed when adding it to the
USTRD field.

The problem was that the description only takes the first 139 characters instead
of the 140 allowed. Also, if you have blank spaces before and after the
description, these blank spaces counts for the count of the string and the
description is filled wrong. If the string length was smaller than 140
characters, the last character of the string is also deleted.

The solution is to check if the string has more than 140 characters. If so, we
retrieve the first 140 characters excluding blank spaces. If is lesser than 140
characters, the function don't do anything.

---
M src/org/openbravo/sepa/iso20022/credittransfer/customertobank/pain/x001/x001/x03/report/CreditTransfer.java
M src/org/openbravo/sepa/iso20022/credittransfer/customertobank/pain/x001/x001/x04/report/CreditTransfer.java
---
(0077857)
vmromanos   
2015-05-28 09:56   
Code review + testing OK

Available in SEPA Credit Transfer Customer-to-Bank 1.0.6 or higher