Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029424Openbravo ERPA. Platformpublic2015-03-26 08:422015-04-07 07:59
alostale 
alostale 
immediatecriticalhave not tried
closedfixed 
5
 
3.0PR15Q1.3 
Core
No
0029424: 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.
blocks defect 00294183.0PR15Q2 closed alostale API change in process definition client side validation function 
Issue History
2015-03-26 10:37alostaleTypedefect => backport
2015-03-26 10:37alostaleTarget Version3.0PR15Q2 => 3.0PR15Q1.3
2015-04-07 07:57hgbotCheckin
2015-04-07 07:58hgbotNote Added: 0076344
2015-04-07 07:59alostaleStatusscheduled => resolved
2015-04-07 07:59alostaleFixed in SCM revision => -
2015-04-07 07:59alostaleResolutionopen => fixed
2015-04-07 07:59alostaleStatusresolved => closed

Notes
(0076344)
hgbot   
2015-04-07 07:57   
Repository: erp/backports/3.0PR15Q1.3
Changeset: 4b69ed748583e4f001c5f91d8994eaafaf9fb6f8
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 26 10:26:30 2015 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.3/rev/4b69ed748583e4f001c5f91d8994eaafaf9fb6f8 [^]

fixed bug 29416, related to issue 29424: 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
---