Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040721Openbravo ERPA. Platformpublic2019-04-30 13:262019-05-31 09:43
aferraz 
caristu 
normalmajorhave not tried
closedfixed 
5
 
3.0PR19Q3 
alostale
Core
No
0040721: Mandatory field in pick and execute not correctly checked
Mandatory field in pick and execute not correctly checked
- Create a Process Definition with a Pick and Execute parameter including a Date mandatory field
OR
- Use Add Special Schedule process definition in Schedule window included in: https://code.openbravo.com/erp/pmods-branches/org.openbravo.retail.config-crosspayment [^]
- Select a record in the pick and execute leaving the mandatory date field empty
- Click on Done
- Realize no error is shown
Following line in ob-formitem-pickeditgrid.js seems to be wrong:

if (record[fields[j].name] === null || record[fields[j].name] === '' || record[fields[j] === undef]) {
No tags attached.
related to defect 0040723 closed caristu Client validation not launched in Process Definition if record is not selected in a Pick and Execute without selected column 
related to defect 00267223.0PR14Q3 closed guillermogil P&E after selecting all the system does not check if the mandatory fields are set 
Issue History
2019-04-30 13:26aferrazNew Issue
2019-04-30 13:26aferrazAssigned To => platform
2019-04-30 13:26aferrazModules => Core
2019-04-30 13:26aferrazTriggers an Emergency Pack => No
2019-04-30 13:38aferrazRelationship addedrelated to 0040723
2019-04-30 13:42aferrazProposed Solution updated
2019-05-07 18:44caristuRelationship addedrelated to 0026722
2019-05-28 18:55hgbotCheckin
2019-05-28 18:55hgbotNote Added: 0112214
2019-05-28 18:55hgbotStatusnew => resolved
2019-05-28 18:55hgbotResolutionopen => fixed
2019-05-28 18:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ea3c09846afd8af4f7b37583ae13de950cbf149d [^]
2019-05-28 18:56caristuAssigned Toplatform => caristu
2019-05-28 18:56caristuReview Assigned To => alostale
2019-05-29 03:20hudsonbotCheckin
2019-05-29 03:20hudsonbotNote Added: 0112219
2019-05-29 10:03hgbotCheckin
2019-05-29 10:03hgbotNote Added: 0112221
2019-05-29 20:49hudsonbotCheckin
2019-05-29 20:49hudsonbotNote Added: 0112244
2019-05-31 09:43alostaleNote Added: 0112290
2019-05-31 09:43alostaleStatusresolved => closed
2019-05-31 09:43alostaleFixed in Version => 3.0PR19Q3

Notes
(0112214)
hgbot   
2019-05-28 18:55   
Repository: erp/devel/pi
Changeset: ea3c09846afd8af4f7b37583ae13de950cbf149d
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue May 28 18:48:54 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ea3c09846afd8af4f7b37583ae13de950cbf149d [^]

fixes bug 40721: Mandatory field in P&E grids not correctly checked

  There was a wrong condition when checking if the mandatory fields in a record of a P&E grid. Fixing it together with minor improvements:

  - Deleted wrong condition to check undefined value: "record[fields[j] === undef]"
  - Use "!record[fields[j].name]" expression to check if the value is null or undefined
  - Avoid unnecessary nested "if"
  - Use "!lineNumbers" instead of "lineNumbers === undef"

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-pickeditgrid.js
---
(0112219)
hudsonbot   
2019-05-29 03:20   
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/f61d63883754 [^]
Maturity status: Test
(0112221)
hgbot   
2019-05-29 10:03   
Repository: erp/devel/pi
Changeset: 8671a3b792fffce9d045d8a8f4f34f701e15ba5c
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed May 29 10:00:12 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8671a3b792fffce9d045d8a8f4f34f701e15ba5c [^]

related to bug 40721: fix null/undefined check

  Replaced "!record[fields[j].name]" with direct checking of null/undefined values. This is because if having a numeric field populated with a value of 0, the field was wrongly detected as empty.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-pickeditgrid.js
---
(0112244)
hudsonbot   
2019-05-29 20:49   
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/0705db562021 [^]
Maturity status: Test
(0112290)
alostale   
2019-05-31 09:43   
reviewed + tested