Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028469Openbravo ERPA. Platformpublic2014-12-22 18:482015-02-04 20:33
caristu 
AugustoMauch 
immediateminorhave not tried
closedfixed 
5
pi 
3.0PR15Q23.0PR15Q2 
alostale
Core
No
0028469: It is possible to save a masked string with incorrect length in grid view
It is possible to save a masked string with incorrect length in grid view
1) Create a new maked string reference [1]. Use the following pattern for the string: ###. This means the string should consist of 3 digits
2) Create a new column with this reference and the corresponding field for the column.
3) Recompile and restart
4) Access to the window with the new field in form mode. Enter the following value in the field: 12. Notice that an error is thrown and the record is not saved. (see attached screenshot 1)
5) Put the window in grid mode. Enter the following value in the field: 12. It seems that the wrong format is detected, but the record is saved with the wrong value. (see attached screenshot 2)

[1] http://wiki.openbravo.com/wiki/How_to_add_a_masked_text_field [^]
No tags attached.
caused by defect 0019176 closed mtaal Grid editing problem 
related to defect 00281883.0PR15Q1 closed AugustoMauch Wrong information displayed after refresh a tab having an error when saving in grid view 
png s1.png (43,637) 2014-12-22 18:48
https://issues.openbravo.com/file_download.php?file_id=7631&type=bug
png

png s2.png (56,185) 2014-12-22 18:49
https://issues.openbravo.com/file_download.php?file_id=7632&type=bug
png

? issue28469.export (4,729) 2014-12-24 09:25
https://issues.openbravo.com/file_download.php?file_id=7635&type=bug
Issue History
2014-12-22 18:48caristuNew Issue
2014-12-22 18:48caristuAssigned To => AugustoMauch
2014-12-22 18:48caristuFile Added: s1.png
2014-12-22 18:48caristuModules => Core
2014-12-22 18:48caristuResolution time => 1419634800
2014-12-22 18:48caristuTriggers an Emergency Pack => No
2014-12-22 18:49caristuFile Added: s2.png
2014-12-23 07:41alostaleRelationship addedrelated to 0028188
2014-12-23 12:31AugustoMauchRelationship addedcaused by 0019176
2014-12-23 12:44AugustoMauchFile Added: issue28469.export
2014-12-23 12:46AugustoMauchNote Added: 0072796
2014-12-23 13:00AugustoMauchFile Deleted: issue28469.export
2014-12-23 13:01AugustoMauchNote Deleted: 0072796
2014-12-24 09:25AugustoMauchFile Added: issue28469.export
2014-12-24 09:27AugustoMauchNote Added: 0072806
2014-12-24 09:35AugustoMauchStatusnew => scheduled
2014-12-24 09:35AugustoMauchfix_in_branch => pi
2014-12-24 13:08AugustoMauchNote Added: 0072816
2015-01-05 13:39AugustoMauchIssue Monitored: alostale
2015-01-05 13:40AugustoMauchReview Assigned To => alostale
2015-01-05 13:40AugustoMauchfix_in_branchpi =>
2015-01-05 16:03hgbotCheckin
2015-01-05 16:03hgbotNote Added: 0073310
2015-01-05 16:03hgbotStatusscheduled => resolved
2015-01-05 16:03hgbotResolutionopen => fixed
2015-01-05 16:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b614afc46817e3d234147b4ff2b74f1b631adf58 [^]
2015-01-05 16:26hgbotCheckin
2015-01-05 16:26hgbotNote Added: 0073312
2015-01-05 17:00hgbotCheckin
2015-01-05 17:00hgbotNote Added: 0073315
2015-01-08 12:06alostaleNote Added: 0073353
2015-01-08 12:06alostaleStatusresolved => closed
2015-01-08 12:06alostaleFixed in Version => 3.0PR15Q2
2015-02-04 20:33hudsonbotCheckin
2015-02-04 20:33hudsonbotNote Added: 0074109
2015-02-04 20:33hudsonbotCheckin
2015-02-04 20:33hudsonbotNote Added: 0074110
2015-02-04 20:33hudsonbotCheckin
2015-02-04 20:33hudsonbotNote Added: 0074112

Notes
(0072806)
AugustoMauch   
2014-12-24 09:27   
A fix has been attached and pushed to try. It will not be included in pi until it is open for changesets targeting PR15Q2
(0072816)
AugustoMauch   
2014-12-24 13:08   
The changeset went through try succesfully
(0073310)
hgbot   
2015-01-05 16:03   
Repository: erp/devel/pi
Changeset: b614afc46817e3d234147b4ff2b74f1b631adf58
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jan 05 13:38:32 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b614afc46817e3d234147b4ff2b74f1b631adf58 [^]

Fixes issue 28469: Masked string validation is properly done in editable grid

There were several problems that were preventing the handling of masked string validations from working properly:
1- The masked string validations were not being performed in grid view, due to this code in the validate function:

      if (this.form && this.form.grid && this.form.grid._showingEditor) {
        return;
      }

   That code was put there to prevent doing unneeded validations when a new record was created in the grid view (see issue https://issues.openbravo.com/view.php?id=19176 [^]). This issue remains fixed after re
moving these lines.

2- After fixing 1), the Save toolbar button was enabled in the grid view even if the row being edited had masked string validation errores. These happened because of a flaw in the logic to disable the butt
on:

     this.setDisabled(... && !hasErrors && ...);

   The button was being disabled when the editable form did not have errors, and enabled when the form had errors. Before fixing 1) this did not matter, as hasErrors was always false because the form item
was not being validated. This has been fixed by disabling the button when the form had validation errors.

3- Sometimes (i.e. when the validation was performed due to an autosave) the mask validation was not taken into account. This happened because the validation was added to the validation list of the test it
em, but not to the validation list of the grid field, that is where it was being taken from.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-text.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
(0073312)
hgbot   
2015-01-05 16:26   
Repository: erp/devel/pi
Changeset: aafc50f0ea12ff86bcf66d2b213516c992356aed
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jan 05 16:26:06 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/aafc50f0ea12ff86bcf66d2b213516c992356aed [^]

Related with issue 28469: Updates copyright year in license text

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-text.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
(0073315)
hgbot   
2015-01-05 17:00   
Repository: erp/devel/pi
Changeset: c64817b82a3ecba643bd28c749b9476a1cc1f28b
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jan 05 16:59:32 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c64817b82a3ecba643bd28c749b9476a1cc1f28b [^]

Related with issue 28469: Removes comment that refers to deleted code

---
M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
(0073353)
alostale   
2015-01-08 12:06   
code reviewed

tested this case + issue 0019176
(0074109)
hudsonbot   
2015-02-04 20:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f36c91d0ad63 [^]
Maturity status: Test
(0074110)
hudsonbot   
2015-02-04 20:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f36c91d0ad63 [^]
Maturity status: Test
(0074112)
hudsonbot   
2015-02-04 20:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f36c91d0ad63 [^]
Maturity status: Test