Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0026761 | Openbravo ERP | A. Platform | public | 2014-06-02 13:37 | 2014-06-10 22:23 |
Reporter | guillermogil | ||||
Assigned To | guillermogil | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
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 | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|