Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0029568 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] A. Platform | minor | always | 2015-04-09 10:45 | 2015-04-14 16:51 | |||
Reporter | umartirena | View Status | public | |||||
Assigned To | caristu | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | 3.0PR15Q1.3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | ebd8a590d21e | ||||
Projection | none | ETA | none | Target Version | 3.0PR15Q1.3 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | AugustoMauch | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0029568: onChange event does not work fine using Date parameters in Process Definition | |||||||
Description | If an Onchange javascript function is added to a Date Parameter in a Process Definition, the event is only raised the first time that the value is changed using the calendar element. And is executed when manually changing the focus to another place. It would be great to not to be necessary to change the focus manually. When the value is changed directly in the field using keyboard the event gets executed always, but does not work as expected after the first execution. | |||||||
Steps To Reproduce | As System Administrator: * Go to Process Definition window and select Add Transaction record. * In trxdate parameter add the following value in OnChange Function: OB.APRM.AddTransaction.trxDateOnChangeFunction * In ob-aprm-addTransaction.js and the following piece of code: OB.APRM.AddTransaction.trxDateOnChangeFunction = function (item, view, form, grid) { form.getItem('dateacct').setValue(new Date(item.getValue())); }; As F&B Group Admin: * Go to Financial Account window. Select "Bank - Account 1". * Go to Imported Bank Statements tab. Create a Header. * Create a Bank Statement Line. Amount Out 10. Process it. * Click on Match Statement. Cancel the displayed popup. * Select the previously created line and click on Add Transaction. * Change Transaction Date using the calendar element or manually. * Notice that the behavior described above happens. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0076524) hgbot (developer) 2015-04-14 13:42 |
Repository: erp/backports/3.0PR15Q1.3 Changeset: ebd8a590d21e62cbe8d544a7b5272f4cc2b9d228 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Tue Apr 14 13:42:07 2015 +0200 URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.3/rev/ebd8a590d21e62cbe8d544a7b5272f4cc2b9d228 [^] fixes issue 29568: onChange event does not work fine using Date parameters in Process Definition There were two different problems: 1) When changing the value manually, the _textChanged attribute was always true after the first change. This prevented the date value to be updated properly. This has been solved by creating a new method, setDateParameterValue, which avoids this problem when setting the date parameter values. The following documentation has been updated with this information: http://wiki.openbravo.com/wiki/How_to_create_a_Standard_Process_Definition#Advanced_Topics [^] 2) When changing the value from the date picker, the onblur event was not being called after the first time. This has been solved by calling the handleItemChange method of the OBParameterWindowForm class after choosing the value from the picker. --- M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js --- |
(0076533) AugustoMauch (administrator) 2015-04-14 16:51 |
Code reviewed and verified in [1]@ebd8a590d21e. Note that in order to test it the steps to reproduce must be modified. This line: form.getItem('dateacct').setValue(new Date(item.getValue())); must be replaced with this line: form.getItem('dateacct').setDateParameterValue(new Date(item.getValue())); [1] https://code.openbravo.com/erp/backports/3.0PR15Q1.3/ [^] |
Issue History | |||
Date Modified | Username | Field | Change |
2015-04-13 08:48 | alostale | Type | defect => backport |
2015-04-13 08:48 | alostale | Target Version | => 3.0PR15Q1.3 |
2015-04-14 13:42 | hgbot | Checkin | |
2015-04-14 13:42 | hgbot | Note Added: 0076524 | |
2015-04-14 13:42 | hgbot | Status | scheduled => resolved |
2015-04-14 13:42 | hgbot | Resolution | open => fixed |
2015-04-14 13:42 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/backports/3.0PR15Q1.3/rev/ebd8a590d21e62cbe8d544a7b5272f4cc2b9d228 [^] |
2015-04-14 13:43 | caristu | Review Assigned To | => AugustoMauch |
2015-04-14 13:43 | caristu | Issue Monitored: AugustoMauch | |
2015-04-14 15:19 | alostale | Assigned To | platform => caristu |
2015-04-14 16:51 | AugustoMauch | Note Added: 0076533 | |
2015-04-14 16:51 | AugustoMauch | Status | resolved => closed |
2015-04-14 16:51 | AugustoMauch | Fixed in Version | => 3.0PR15Q1.3 |
Copyright © 2000 - 2009 MantisBT Group |