Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0026761 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2014-06-02 13:37 | 2014-06-10 22:23 | |||
Reporter | guillermogil | View Status | public | |||||
Assigned To | guillermogil | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | bc3a8a312111 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | AugustoMauch | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0026761: Clean code on parameter windows | |||||||
Description | Clean code on parameter windows | |||||||
Steps To Reproduce | N/A | |||||||
Proposed Solution | function actionClick() { var hasErrors = false, grid, fields, selection, len, allRows, lineNumbers, i, j, record, undef; view.messageBar.hide(); if (view.grid && view.grid.viewGrid) { grid = view.grid.viewGrid; fields = grid.getFields(); selection = grid.getSelectedRecords() || []; len = selection.length; allRows = grid.data.allRows || grid.data.localData || grid.data; for (i = 0; i < len; i++) { record = grid.getEditedRecord(grid.getRecordIndex(selection[i])); for (j = 0; j < fields.length; j++) { if (fields[j].required) { if (record[fields[j].name] === null || record[fields[j].name] === '' || record[fields[j] === undef]) { hasErrors = true; if (lineNumbers === undef) { lineNumbers = grid.getRecordIndex(selection[i]).toString(); } else { lineNumbers = lineNumbers + "," + grid.getRecordIndex(selection[i]).toString(); } } } } } } if (!hasErrors) { if (view.validate()) { view.doProcess(this._buttonValue); } else { // If the messageBar is visible, it means that it has been set due to a custom validation inside view.validate() // so we don't want to overwrite it with the generic OBUIAPP_ErrorInFields message if (!view.messageBar.isVisible()) { view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_ErrorInFields')); } } } else { view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_FillMandatoryFields') + " " + lineNumbers); } } if (view.grid && view.grid.viewGrid) { condition is always false | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0067673) hgbot (developer) 2014-06-02 15:38 |
Repository: erp/devel/pi Changeset: bc3a8a312111b41aa2ea892d037662651bae1c9c Author: Guillermo Gil <guillermo.gil <at> openbravo.com> Date: Mon Jun 02 15:37:09 2014 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/bc3a8a312111b41aa2ea892d037662651bae1c9c [^] Fixed issue 26761: Clean code on parameter windows Removed for loop that look for errors since that functionality is implemented on validators structure --- M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js --- |
(0067718) AugustoMauch (administrator) 2014-06-03 17:24 |
Code reviewed and verified in pi@9e9cdee21888 |
(0067866) hudsonbot (viewer) 2014-06-10 22:23 |
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/763f16c2ad2e [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2014-06-02 13:37 | guillermogil | New Issue | |
2014-06-02 13:37 | guillermogil | Assigned To | => guillermogil |
2014-06-02 13:37 | guillermogil | Modules | => Core |
2014-06-02 13:37 | guillermogil | OBNetwork customer | => No |
2014-06-02 13:37 | guillermogil | Triggers an Emergency Pack | => No |
2014-06-02 15:29 | guillermogil | Issue Monitored: AugustoMauch | |
2014-06-02 15:30 | guillermogil | Review Assigned To | => AugustoMauch |
2014-06-02 15:38 | hgbot | Checkin | |
2014-06-02 15:38 | hgbot | Note Added: 0067673 | |
2014-06-02 15:38 | hgbot | Status | new => resolved |
2014-06-02 15:38 | hgbot | Resolution | open => fixed |
2014-06-02 15:38 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/bc3a8a312111b41aa2ea892d037662651bae1c9c [^] |
2014-06-03 17:24 | AugustoMauch | Note Added: 0067718 | |
2014-06-03 17:24 | AugustoMauch | Status | resolved => closed |
2014-06-10 22:23 | hudsonbot | Checkin | |
2014-06-10 22:23 | hudsonbot | Note Added: 0067866 |
Copyright © 2000 - 2009 MantisBT Group |