Silent fail when translated column is shorter than original column (FHCA-2888)

Description

Test case:

As System:

  • Change the size of the column C_Charge.Name to 80 characters and synchronize column in the database

As GardenAdmin:

  • Set the client language to Spanish

  • Cache Reset

  • Try to change a charge name to fit the 80 characters

  • Try to insert a charge with 80 characters name

  • Try to run Synchronize Document Translation after having one charge with 80 characters name

The results are different in oracle than postgres:

  • oracle Synchronize Document Translation:
    shows -1 in charge
    no report about the issue

  • oracle adding:
    fails completely silent:
    the charge record is saved, but the translation is not and the user is not notified about this failure

  • oracle updating:
    fails completely silent:

  • postgresql insert:
    it doesn't save the record, silently

  • postgresql update:
    it doesn't save the record, silently

  • postgresql Synchronize Document Translation
    shows -1 in charge and all subsequent tables
    no report about the issue

Environment

None

Activity

Carlos Ruiz 
August 30, 2021 at 2:02 PM

ken.wang reported in mattermost problem with 2pack: https://mattermost.idempiere.org/idempiere/pl/i9a71m16bt8j5kx9pdykgoxgnw

Log shows NPE in line MColumn:530 added in this ticket.

Carlos Ruiz 
August 18, 2021 at 7:42 PM

Pull request 844 implements:

  • Saving a value that doesn't fit in the translation now fails with a proper user understandable message

  • Synchronize Doc Translation now fails with a user understandable message in case it fails because a value doesn't fit

  • When updating a column on a translation table, check for the size of the original column and update the size accordingly

  • When updating a translated column, show warnings to user about creating the table, or creating the column, or updating the column size

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created August 12, 2021 at 10:58 AM
Updated October 1, 2021 at 2:46 PM
Resolved August 30, 2021 at 7:08 PM