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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0021533
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2012-09-03 13:082012-09-26 17:18
ReportermtaalView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version3.0MP16
StatusclosedFix in branchFixed in SCM revision6b2ba000fb7a
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomtaal
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0021533: ShowIf computation incorrect for showIf values which are a boolean

DescriptionIn the ob-main-view.js the showIf property is replaced with a function, see this line:
 fld.showIf = function (item, value, form, values) {

then the original value of showIf is stored in the originalShowIf property. And it is then called in the function above:
          originalShowIfValue = this.originalShowIf(item, value, form, currentValues, context);

But this fails if the original show If value is not a function but a string (for example: "false").

For fields initially not displayed in the grid the showIf has the value "false", see this snippet in the view field ftl:
            <#if !field.showInitiallyInGrid>
                , showIf: '${field.showInitiallyInGrid?string}'
            </#if>
and this is not a function, so treating it as a function call in the ob-view-main.js is wrong. The function definition in ob-view-main.js should be changed to take into account string values.
Steps To ReproduceSee for example the net list price in the sales order line tab.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0021530 closedshankarb Grid editing: columns with displaylogic do not work correctly 

-  Notes
(0051932)
hgbot (developer)
2012-09-07 13:59

Repository: erp/devel/pi
Changeset: 6b2ba000fb7a772d810be7fb7ace8d17a64fff18
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Sep 07 13:57:57 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6b2ba000fb7a772d810be7fb7ace8d17a64fff18 [^]

Fixes issue 21533: Showif computation now supports boolean values

Now, before trying to execute the originalShowIf property, it is checked if it is set to 'true' or 'false'. In that case, it is assigned to originalShowIfValue the corresponding boolean. If not, it is executed as a function as usual.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0051942)
hgbot (developer)
2012-09-07 14:41

Repository: erp/devel/pi
Changeset: c60e1cf42d3b190810fdddfe4dfc2c2d2d53def4
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Sep 07 14:40:32 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c60e1cf42d3b190810fdddfe4dfc2c2d2d53def4 [^]

Related to issue 21533: Fix refactored to detect if input is a function

The code has been refactored, so that if the input is a function is executes it, while if it is not a function, it tries to decode using isc.JSON.decode.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0052123)
mtaal (manager)
2012-09-14 11:39

Reviewed
(0052713)
hudsonbot (developer)
2012-09-26 17:18

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/b780e90c6452 [^]

Maturity status: Test
(0052717)
hudsonbot (developer)
2012-09-26 17:18

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/b780e90c6452 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2012-09-03 13:08 mtaal New Issue
2012-09-03 13:08 mtaal Assigned To => marvintm
2012-09-03 13:08 mtaal Modules => Core
2012-09-03 13:10 mtaal Relationship added related to 0021530
2012-09-05 17:22 AugustoMauch Assigned To marvintm => AugustoMauch
2012-09-07 13:58 AugustoMauch Closed by => mtaal
2012-09-07 13:59 hgbot Checkin
2012-09-07 13:59 hgbot Note Added: 0051932
2012-09-07 13:59 hgbot Status new => resolved
2012-09-07 13:59 hgbot Resolution open => fixed
2012-09-07 13:59 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6b2ba000fb7a772d810be7fb7ace8d17a64fff18 [^]
2012-09-07 14:41 hgbot Checkin
2012-09-07 14:41 hgbot Note Added: 0051942
2012-09-14 11:39 mtaal Note Added: 0052123
2012-09-14 11:39 mtaal Status resolved => closed
2012-09-14 11:39 mtaal Fixed in Version => 3.0MP16
2012-09-26 17:18 hudsonbot Checkin
2012-09-26 17:18 hudsonbot Note Added: 0052713
2012-09-26 17:18 hudsonbot Checkin
2012-09-26 17:18 hudsonbot Note Added: 0052717


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker