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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035087
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. Platformminoralways2017-01-30 17:232017-03-15 20:18
ReportervmromanosView Statuspublic 
Assigned Tocaristu 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q2
StatusclosedFix in branchFixed in SCM revisiona71a3822d5e5
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035087: ReportingUtils should have a public getBaseDesign() method

DescriptionIn BaseReportActionHandler there is the possibility to override getReportTemplatePath() method to provide a custom JRXML template path.

However there is no easy way to recover the @basedesign@ that must be concatenated before the JRXML path.

Example:
@basedesign@: /src-loc/design
jrxml path: /org/openbravo/erpCommon/ad_reports/AgingScheduleHTML.jrxml
returned by getReportTemplatePath(): /src-loc/design/org/openbravo/erpCommon/ad_reports/AgingScheduleHTML.jrxml


A public static method called getBaseDesign() in ReportingUtils should be created to return the @basedesign@, in the example /src-loc/design
Steps To ReproduceNA
Proposed SolutionIn ReportingUtils:

public static String getBaseDesign() {
    ServletContext servletContext = DalContextListener.getServletContext();
    ConfigParameters configParameters = ConfigParameters.retrieveFrom(servletContext);

    String base = configParameters.strBaseDesignPath;
    String design = configParameters.strDefaultDesignPath;

    if (!base.startsWith("/")) {
      base = "/" + base;
    }

    return base + "/" + design;
  }

  private static String getBaseDesignPath() {
    ServletContext servletContext = DalContextListener.getServletContext();
    return servletContext.getRealPath(getBaseDesign());
  }



(see attached file)
TagsNo tags attached.
Attached Filesdiff file icon reportingutils.diff [^] (3,791 bytes) 2017-01-30 17:23 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
blocks feature request 00350893.0PR17Q2 closednonofrancisco Integrate module Aging Balance Report into Openbravo 3 distribution 

-  Notes
(0093955)
hgbot (developer)
2017-01-31 09:17

Repository: erp/devel/pi
Changeset: a71a3822d5e5a15d62daa038c38004c98414b0a0
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Jan 31 09:16:34 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a71a3822d5e5a15d62daa038c38004c98414b0a0 [^]

fixes issue 35087: ReportingUtils should have a public getBaseDesign() method

This new method allows to have an utility method to retrieve the default design sub-folder relative path. This can be useful, for example, for those classes extending BaseReportActionHandler that want to implement their own logic (overriding the getReportTemplatePath method) to retrieve the path of the jrxml template instead of using the default logic which takes the template path from the Application Dictionary.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java
---
(0094025)
alostale (manager)
2017-02-03 08:41

code reviewed
(0095147)
hudsonbot (developer)
2017-03-15 20: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/54e102bef53e [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-01-30 17:23 vmromanos New Issue
2017-01-30 17:23 vmromanos Assigned To => caristu
2017-01-30 17:23 vmromanos File Added: reportingutils.diff
2017-01-30 17:23 vmromanos Modules => Core
2017-01-30 17:23 vmromanos Triggers an Emergency Pack => No
2017-01-30 17:25 vmromanos Summary ReportingUtils should have a public getBaseDesignPath() method => ReportingUtils should have a public getBaseDesign() method
2017-01-30 17:25 vmromanos Description Updated View Revisions
2017-01-31 08:54 vmromanos Relationship added blocks 0035089
2017-01-31 09:17 hgbot Checkin
2017-01-31 09:17 hgbot Note Added: 0093955
2017-01-31 09:17 hgbot Status new => resolved
2017-01-31 09:17 hgbot Resolution open => fixed
2017-01-31 09:17 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a71a3822d5e5a15d62daa038c38004c98414b0a0 [^]
2017-01-31 09:19 caristu Review Assigned To => alostale
2017-02-03 08:41 alostale Note Added: 0094025
2017-02-03 08:41 alostale Status resolved => closed
2017-02-03 08:41 alostale Fixed in Version => 3.0PR17Q2
2017-03-15 20:18 hudsonbot Checkin
2017-03-15 20:18 hudsonbot Note Added: 0095147


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker