Openbravo Issue Tracking System - Openbravo ERP | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0037390 | Openbravo ERP | 00. Application dictionary | public | 2017-11-27 12:33 | 2018-01-03 12:39 |
| Reporter | gorkaion | ||||
| Assigned To | alostale | ||||
| Priority | high | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | OS | 5 | OS Version | ||
| Product Version | |||||
| Target Version | Fixed in Version | 3.0PR18Q1 | |||
| Merge Request Status | |||||
| Review Assigned To | caristu | ||||
| OBNetwork customer | No | ||||
| Web browser | |||||
| Modules | Core | ||||
| Support ticket | 49647 | ||||
| Regression level | |||||
| Regression date | |||||
| Regression introduced in release | |||||
| Regression introduced by commit | |||||
| Triggers an Emergency Pack | No | ||||
| Summary | 0037390: < and > operators fail when comparing negative values in Display Logic | ||||
| Description | "<" and ">" are not properly managed by DynamicExpressionParser and produces a wrong javascript code when comparing with negative values. When creating a Display Logic like: @grandTotalAmount@ < - 5 It is translated to: OB.Utilities.getValue(currentValues,'grandTotalAmount') < !== 5 This is caused because the "<" is not considered as a comparator and the "-" sign is considered instead. In this case it replaces the "-" with "!==" which results in a wrong js code. | ||||
| Steps To Reproduce | On Sales Invoice window. Create some invoices with negative and positive total amounts. On the Application Dictionary modify the Display Logic of the "APRM Process Invoice" field to "@GrandTotal@ > - 5". So it only shows the "Complete" button if the total amount of the invoice is higher than "-5". Try to open the Sales Invoice tab and it fails. If you check the browser's console you see a javascript error with the wrong displayIf function. | ||||
| Proposed Solution | Add the "<", ">", "<=" and ">=" to the array of "COMPARATIONS" in DynamicExpressionParser. So the negative number is considered as the right part of the expression and the "-" sign is not replaced by "!==". | ||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2017-11-27 12:33 | gorkaion | New Issue | |||
| 2017-11-27 12:33 | gorkaion | Assigned To | => platform | ||
| 2017-11-27 12:33 | gorkaion | OBNetwork customer | => No | ||
| 2017-11-27 12:33 | gorkaion | Modules | => Core | ||
| 2017-11-27 12:33 | gorkaion | Support ticket | => 49647 | ||
| 2017-11-27 12:33 | gorkaion | Triggers an Emergency Pack | => No | ||
| 2017-11-28 09:35 | alostale | Status | new => scheduled | ||
| 2017-11-28 09:35 | alostale | Assigned To | platform => alostale | ||
| 2017-11-28 09:57 | hgbot | Checkin | |||
| 2017-11-28 09:57 | hgbot | Note Added: 0100754 | |||
| 2017-11-28 09:57 | hgbot | Status | scheduled => resolved | ||
| 2017-11-28 09:57 | hgbot | Resolution | open => fixed | ||
| 2017-11-28 09:57 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/6a9db69516b2560f153d3390235b88d447af4d7e [^] | ||
| 2017-11-28 09:57 | alostale | Review Assigned To | => caristu | ||
| 2017-11-28 19:34 | caristu | Note Added: 0100800 | |||
| 2017-11-28 19:34 | caristu | Status | resolved => closed | ||
| 2017-11-28 19:34 | caristu | Fixed in Version | => 3.0PR18Q1 | ||
| 2018-01-03 12:39 | hudsonbot | Checkin | |||
| 2018-01-03 12:39 | hudsonbot | Note Added: 0101465 | |||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||