Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031627
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2015-12-01 12:152015-12-23 09:45
ReportercaristuView Statuspublic 
Assigned Toinigosanchez 
PriorityhighResolutionfixedFixed in Version3.0PR16Q1
StatusclosedFix in branchFixed in SCM revisiond9584faf499b
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0031627: Fields with display logic equals to false cause js check error in log

DescriptionFields 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 Reproduce1) Put core in 'In Development' status
2) Open [Business Partner] window
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0024319 closedinigosanchez Grid mode should hide field content as per display logic rule 
related to defect 00240323.0MP25 closedjonalegriaesarte Save description in purchase invoice is failing when the invoice is booked 
related to defect 0031767 acknowledgedTriage Platform Base Weird relation error thrown in the log depending on the read only and display logic values 

-  Notes
(0082689)
hgbot (developer)
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
---
(0082690)
inigosanchez (developer)
2015-12-13 20:18
edited on: 2015-12-13 20:18

Specially tested in tabs which contain fields where f.displaylogic = 'false':
* Sales Invoice - Lines
* Purchase Invoice - Lines
* Business Partner - Business Partner
* Financial Account - Account

(0082693)
hudsonbot (developer)
2015-12-14 01:59

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/a26c11c3031d [^]
Maturity status: Test
(0082706)
AugustoMauch (manager)
2015-12-14 12:04

Does the same error message appears in the log if "true" is used instead of "false" in the display logic of field?
(0082708)
inigosanchez (developer)
2015-12-14 12:17

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.
(0082753)
AugustoMauch (manager)
2015-12-15 09:54

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 (developer)
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 (developer)
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 [^]


- 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 View Revisions
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 View Revisions
2015-12-22 18:45 caristu Note Edited: 0082948 View Revisions
2015-12-22 18:46 caristu Note Edited: 0082948 View Revisions
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 View Revisions


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker