Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0031627 | Openbravo ERP | A. Platform | public | 2015-12-01 12:15 | 2015-12-23 09:45 |
|
Reporter | caristu | |
Assigned To | inigosanchez | |
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR16Q1 | |
Merge Request Status | |
Review Assigned To | caristu |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0031627: Fields with display logic equals to false cause js check error in log |
Description | Fields with display logic equals to false cause js check error in log. This errors are displayed in the log only if we have modules in in development status:
>>>>>>> Issues found in javascript <<<<<<<<<
Core.View:3528:46: Weird relation. >> offending code: f.disableItem('customer', (false) === false);
Core.View:3532:44: Weird relation. >> offending code: f.disableItem('vendor', (false) === false);
Core.View:3536:46: Weird relation. >> offending code: f.disableItem('employee', (false) === false); |
Steps To Reproduce | 1) Put core in 'In Development' status
2) Open [Business Partner] window |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | design defect | 0024319 | | closed | inigosanchez | Grid mode should hide field content as per display logic rule | related to | defect | 0024032 | 3.0MP25 | closed | jonalegriaesarte | Save description in purchase invoice is failing when the invoice is booked | related to | defect | 0031767 | | acknowledged | Triage Platform Base | Weird relation error thrown in the log depending on the read only and display logic values |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-12-01 12:15 | caristu | New Issue | |
2015-12-01 12:15 | caristu | Assigned To | => platform |
2015-12-01 12:15 | caristu | Modules | => Core |
2015-12-01 12:15 | caristu | Triggers an Emergency Pack | => No |
2015-12-01 12:16 | caristu | Relationship added | related to 0024319 |
2015-12-01 13:13 | caristu | Relationship added | related to 0024032 |
2015-12-01 13:14 | caristu | Assigned To | platform => inigosanchez |
2015-12-01 13:14 | caristu | Status | new => acknowledged |
2015-12-01 13:32 | shuehner | Issue Monitored: shuehner | |
2015-12-10 11:29 | inigosanchez | Status | acknowledged => scheduled |
2015-12-13 20:12 | inigosanchez | Review Assigned To | => caristu |
2015-12-13 20:13 | hgbot | Checkin | |
2015-12-13 20:13 | hgbot | Note Added: 0082689 | |
2015-12-13 20:13 | hgbot | Status | scheduled => resolved |
2015-12-13 20:13 | hgbot | Resolution | open => fixed |
2015-12-13 20:13 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/d9584faf499bc5ec6df24ef53abc548a8608d754 [^] |
2015-12-13 20:18 | inigosanchez | Note Added: 0082690 | |
2015-12-13 20:18 | inigosanchez | Note Edited: 0082690 | bug_revision_view_page.php?bugnote_id=0082690#r10454 |
2015-12-14 01:59 | hudsonbot | Checkin | |
2015-12-14 01:59 | hudsonbot | Note Added: 0082693 | |
2015-12-14 12:04 | AugustoMauch | Note Added: 0082706 | |
2015-12-14 12:17 | inigosanchez | Note Added: 0082708 | |
2015-12-15 09:54 | AugustoMauch | Note Added: 0082753 | |
2015-12-22 18:43 | caristu | Note Added: 0082948 | |
2015-12-22 18:43 | caristu | Status | resolved => new |
2015-12-22 18:43 | caristu | Resolution | fixed => open |
2015-12-22 18:44 | caristu | Note Edited: 0082948 | bug_revision_view_page.php?bugnote_id=0082948#r10525 |
2015-12-22 18:45 | caristu | Note Edited: 0082948 | bug_revision_view_page.php?bugnote_id=0082948#r10526 |
2015-12-22 18:46 | caristu | Note Edited: 0082948 | bug_revision_view_page.php?bugnote_id=0082948#r10527 |
2015-12-23 09:43 | caristu | Status | new => scheduled |
2015-12-23 09:43 | caristu | Status | scheduled => resolved |
2015-12-23 09:43 | caristu | Resolution | open => fixed |
2015-12-23 09:45 | caristu | Note Added: 0082954 | |
2015-12-23 09:45 | caristu | Status | resolved => closed |
2015-12-23 09:45 | caristu | Fixed in Version | => 3.0PR16Q1 |
2015-12-23 09:45 | caristu | Relationship added | related to 0031767 |
2015-12-23 09:46 | caristu | Note Edited: 0082954 | bug_revision_view_page.php?bugnote_id=0082954#r10531 |
Notes |
|
(0082689)
|
hgbot
|
2015-12-13 20:13
|
|
Repository: erp/devel/pi
Changeset: d9584faf499bc5ec6df24ef53abc548a8608d754
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Sun Dec 13 18:52:55 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d9584faf499bc5ec6df24ef53abc548a8608d754 [^]
Fixed issue 31627:Fields with display logic equals to false cause js error
The problem was when a display logic was false (not a condition evaluated
to false) an error is thrown in the console. This error warned about trivial
comparisons (false === false).
To resolved this problem it has been added some condition to check this special
case. When a display logic is false, it is avoid this unecessary comparasion.
Now when a display logic is false is avoid to make this trivial comparison.
---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-form.js.ftl
---
|
|
|
|
Specially tested in tabs which contain fields where f.displaylogic = 'false':
* Sales Invoice - Lines
* Purchase Invoice - Lines
* Business Partner - Business Partner
* Financial Account - Account
|
|
|
|
|
|
|
Does the same error message appears in the log if "true" is used instead of "false" in the display logic of field? |
|
|
|
In case that "true" value is used there is no problem because errors are thrown when a trivial comparisons are done. For example "(true) === true" or "(false) === false".
This comparison is "(X) === false" for that reason only affects in cases than display logic are false.
It is already tested. |
|
|
|
Ok, thanks!
Actually (true) == true (always evaluated to true) is as trivial as (true) == false (always evaluated to false), but for whatever reason the compiler does not complain. |
|
|
(0082948)
|
caristu
|
2015-12-22 18:43
(edited on: 2015-12-22 18:46) |
|
There is still one case to be analyzed which is causing the same parsing error in the log:
Steps to reproduce, using the Unit of Measure window:
1) Define a display logic for the symbol field, for example: @name@='Day'
2) Define a fixed read-only logic for the column related to the symbol field, for example: true
3) Open the Unit of Measure window and check the log:
Weird condition. >> offending code: f.disableItem('symbol', (true) || (OB.Utilities.getValue(currentValues,'name') === 'Day') === false);
|
|
|
(0082954)
|
caristu
|
2015-12-23 09:45
(edited on: 2015-12-23 09:46) |
|
Verified:
- The error does not appear in the log anymore
- Display logic in form and grid continue working fine
- Read only logic works fine
- Created a new issue for the missing case mentioned above: https://issues.openbravo.com/view.php?id=31767 [^]
|
|