Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029418Openbravo ERPA. Platformpublic2015-03-26 08:422015-03-26 16:35
alostale 
alostale 
immediatecriticalhave not tried
closedfixed 
5
 
3.0PR15Q2 
Core
No
0029418: API change in process definition client side validation function
In order to fix issue 0029416 Done button in process definition is locked while client side validations are being executed. If the validation succeeds, the complete UI is locked to execute the process, but if it fails, UI should be unlocked again.

As client side validation can perform asynchronous tasks, caller cannot decide when the UI should be unlocked, so this should be done by the client side definition function.

Proposed API change:

-Current API for client side validation functions [1] is:
  function (view, actionHandlerCall)
    This function is charge of invoking actionHandlerCall in case of successful validation or do nothing if they fail.
    

-New proposed API:
  function (view, actionHandlerCall, clientSideValidationFail)
    Now the function should call actionHandlerCall in case of success and clientSideValidationFail in case of invalid.


[1] http://wiki.openbravo.com/wiki/How_to_create_a_Standard_Process_Definition#Invoking_a_client_side_validation_before_calling_the_action_handler [^]
-
This change affects to all process definitions with client side validations (this feature was added in PR14Q3), it affects 5 processes in Openbravo 3 distribution, but as it is a relatively new feature, we don't expect many modules making use of it.

Risk assessment: medium

Components affected by this change that are not updated would misbehave in case parameter values don't satisfy client side validation, in which case Done button would be locked. When in this situation, button would be unlocked in case of changing parameter values or if the process popup/window is reopened.

Note if issue 0029388 is backported to PR15Q1, this API change will also be backported.
No tags attached.
related to feature request 00259953.0PR14Q3 closed AugustoMauch Parameter Windows Phase III 
depends on backport 00294243.0PR15Q1.3 closed alostale API change in process definition client side validation function 
blocks backport 00294163.0PR15Q1.3 closed alostale Duplicated records in Used Credit Source tab when clicking Done more than once in Add Details pop-up 
blocks defect 0029388 closed alostale Duplicated records in Used Credit Source tab when clicking Done more than once in Add Details pop-up 
Issue History
2015-03-26 08:42alostaleNew Issue
2015-03-26 08:42alostaleAssigned To => dmitry_mezentsev
2015-03-26 08:42alostaleModules => Core
2015-03-26 08:42alostaleTriggers an Emergency Pack => No
2015-03-26 08:43alostaleProposed Solution updated
2015-03-26 08:43alostaleRelationship addedblocks 0025995
2015-03-26 08:44alostaleRelationship replacedrelated to 0025995
2015-03-26 08:44alostaleRelationship addedblocks 0029416
2015-03-26 08:44alostaleRelationship addedblocks 0029388
2015-03-26 10:24dmitry_mezentsevNote Added: 0075990
2015-03-26 10:24dmitry_mezentsevAssigned Todmitry_mezentsev => alostale
2015-03-26 10:33hgbotCheckin
2015-03-26 10:33hgbotNote Added: 0075991
2015-03-26 10:37alostaleStatusnew => scheduled
2015-03-26 11:15alostaleStatusscheduled => resolved
2015-03-26 11:15alostaleFixed in SCM revision => -
2015-03-26 11:15alostaleResolutionopen => fixed
2015-03-26 11:15alostaleStatusresolved => closed
2015-03-26 16:35hudsonbotCheckin
2015-03-26 16:35hudsonbotNote Added: 0076023

Notes
(0075990)
dmitry_mezentsev   
2015-03-26 10:24   
Approved.
(0075991)
hgbot   
2015-03-26 10:33   
Repository: erp/devel/pi
Changeset: 9216d290b2f207e748568dc7430aaf7ca41d5033
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 26 10:26:30 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9216d290b2f207e748568dc7430aaf7ca41d5033 [^]

fixed bug 29388, related to issue 29418: Done can be clicked more than once

  In process definition Done button was enabled and clickable while client side
  validations were being evaluated. This was specially noticeable if those validations
  perform backend requests to be completed (which is the case of Add Payment).

  Fixed by disabling Done button as first step before executing any validation.

---
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addTransaction.js
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-findTransaction.js
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-matchStatement.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js
M web/js/validateCostingRuleProcess.js
---
(0076023)
hudsonbot   
2015-03-26 16:35   
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/74bd53f51456 [^]
Maturity status: Test