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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028414
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2014-12-15 16:262015-02-04 20:33
ReportercaristuView Statuspublic 
Assigned ToNaroaIriarte 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision4e47ac5c68fa
ProjectionnoneETAnoneTarget Version3.0PR15Q2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028414: Change the error that appears in the log when defining a button without a process

DescriptionThe following error trace appears in the log after accessing to a window that has a button without a process or a process definition assigned to it:

ERROR freemarker.runtime - Expression field.url is undefined on line 260, column 24 in template.
 
Expression field.url is undefined on line 260, column 24 in template.
The problematic instruction:
----------
==> ${field.url?js_string} [on line 260, column 22 in template]
 in user-directive compress [on line 257, column 1 in template]
 in user-directive createView [on line 195, column 1 in template]
----------
 
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression field.url is undefined on line 260, column 24 in template.
        at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
        ....
Steps To Reproduce1) In [Tables and Columns], add a new column to any table, with button reference. Leave the process and process definition fields empty.

2) In [Windows, Tabs and Fields], add the field into the window for the previous column

3) Recompile and Restart

4) Open the window that contains the new field. Notice that the error trace is displayed in the log
Proposed SolutionShow a warning message (in the log or in the application) instead of that error trace, saying that a button without a process has been defined in the application dictionary for the window.
TagsNo tags attached.
Attached Files? file icon issue-28414.export [^] (2,158 bytes) 2015-01-02 09:29

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0073290)
AugustoMauch (manager)
2015-01-02 09:30

A fix has been attached and will be pushed to pi once it is open for changesets targeting PR15Q2
(0073302)
hgbot (developer)
2015-01-05 11:34

Repository: erp/devel/pi
Changeset: 4e47ac5c68fa15fe017eb69dc7ab3ee2374ce69d
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue Dec 30 10:50:25 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4e47ac5c68fa15fe017eb69dc7ab3ee2374ce69d [^]

Related with issue 28414: Change the error that appears in the log.

An error appears in the log when accessing a window which has a button with not a process nor a process definition assigned to it.

The problem was that the fact of a button with not process nor process definition assigned to it was not taken into account and that was why an url and a command
 where not defined.

For fixing this a condition has been added to the function "getURL" and other one to the function "getCommand".
Now if a url or a command is null, a dummy value is given to them. Now, as they have a value, that value can be transformed into a string and the NPE error disappears.

This handles the case when the button is already wrongly configured. In the next step we will avoid making this configuration mistakes in new buttons.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
---
(0073303)
AugustoMauch (manager)
2015-01-05 11:36

Code reviewed and verified in pi@4e47ac5c68fa
(0074103)
hudsonbot (developer)
2015-02-04 20:33

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/f36c91d0ad63 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2014-12-15 16:26 caristu New Issue
2014-12-15 16:26 caristu Assigned To => AugustoMauch
2014-12-15 16:26 caristu Modules => Core
2014-12-15 16:26 caristu Resolution time => 1424732400
2014-12-15 16:26 caristu Triggers an Emergency Pack => No
2014-12-15 16:26 caristu Issue Monitored: networkb
2014-12-15 16:28 caristu Proposed Solution updated
2014-12-29 14:31 AugustoMauch Assigned To AugustoMauch => NaroaIriarte
2015-01-02 09:29 AugustoMauch File Added: issue-28414.export
2015-01-02 09:30 AugustoMauch Note Added: 0073290
2015-01-02 09:39 AugustoMauch Status new => scheduled
2015-01-02 09:39 AugustoMauch fix_in_branch => pi
2015-01-05 11:34 hgbot Checkin
2015-01-05 11:34 hgbot Note Added: 0073302
2015-01-05 11:36 AugustoMauch Status scheduled => resolved
2015-01-05 11:36 AugustoMauch Fixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/4e47ac5c68fa15fe017eb69dc7ab3ee2374ce69d [^]
2015-01-05 11:36 AugustoMauch Resolution open => fixed
2015-01-05 11:36 AugustoMauch Review Assigned To => AugustoMauch
2015-01-05 11:36 AugustoMauch Note Added: 0073303
2015-01-05 11:36 AugustoMauch Status resolved => closed
2015-02-04 20:33 hudsonbot Checkin
2015-02-04 20:33 hudsonbot Note Added: 0074103


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker