There are some inconsistencies in the code for string comparison statusId.equals(PRUN_COMPLETED) whereas it should be written as PRUN_COMPLETED.equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.
Thanks: Devanshu for your contribution.
* [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug (OFBIZ-11762)
* [Improved]: Updated all ocurances where we only needed to pass the throwable object, without a message
- We have now added one more utility method to handle these cases. (OFBIZ-11762)
Co-authored-by: Priya Sharma <priya.sharma@example.com>
(OFBIZ-11064)
As we all know, Groovy is a powerful language with great built-in functions.
Groovy Truth[1] is one of them, which is not used properly in our code base.
We have used UtilValidate Class to validate arguments for Empty or NotEmpty,
which can easily be done in groovy with built-in functionality[1].
Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }
Groovy Built-in Code: if (locations) { ... }
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth
We need to careful for some points while we change this:
Like:
maxRetry = 0
if (!maxRetry)
{ // Not set, use a default maxRetry = -1 }
Because groovy evaluates zero to be false, it wouldn't be possible to set
maxRetry to zero. So it's best not to use groovy truth for null-checks on
numbers in some cases.
Thanks: Pawan Verma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
need to do other actions
(OFBIZ-9194)
The solution I provided with revision: 1781218 was wrong. A really satisfying
solution would be to gray the "Send" button on the
birt/control/CreateFlexibleReport page. But that's not something easy to do
because it's generated from a content.
So I decided to remove the part in the PrepareBirtCall.groovy and add an
indication in the BirtErrorNotPublishedReport for users to use their browser
back button. Because you catch a ViewHandlerException in
RequestHandler.renderView() and there is not much you can do at this stage...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1788020 13f79535-47bb-0310-9956-ffa450edef68
to do other actions
(OFBIZ-9194)
You need to add the data set fields with the Birt Report Designer
and publish the report. This will be documented with OFBIZ-9188
I thought about graying the button but it was a delicate matter because it uses
a <content element in screen and directly call a view handled from a Groovy
event.
It was easier to fix the PrepareBirtCall Groovy event. But to be totally sure
I also handled the possible NPE in the BirtViewHandler
I also fixed viewLast error in controller
Because the files were not committed with the svn:eol-style native property
you will see false changes in this commit. Some files have their svn:eol-style
native property set. I'll soon commit missing so in new Birt Java files.
I'll also commit a lot of svn:eol-style native property changes for XML and
Groovy files which have been neglected so far. I'm sorry for that because
when we do so we loose the annotations history. I will then definitely put in
place what I suggested in http://markmail.org/message/ffmyw773p65fndey
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/plugins@1781218 13f79535-47bb-0310-9956-ffa450edef68
The concept, you define a report domain related to an entity or a service through a master content (master report) and a master search form.
When a high level user create a report on a configured domain, OFBiz prepare an instantiation of the master content (flexible report) that permit
to surcharge the search form (recorded dynamically on the content as ElectronicText) and prepare a rptDesign skeleton.
The high level user can download the rptDesign to edit it trhough the birt editor, with all fields that ofbiz will be load as dataset and when is finish upload the result on the content instantiation.
For the end user, he selected the instantiation report, OFBiz display the report search from the content instantiation and the submission call birt with the search parameters and the linked rptDesign.
The rptDesign file is drive by OFBiz to build the data set by two methods :
* call the performFind if the domain is related to an entity
* call the a custom service if the domain is related to a service.
For the last case we need two services, a first who prepare and list available fields for search and display. And a second who realize the search.
By convention currently the first service as the same name that the second service suffixed by 'PrepareFields'
This commit contains :
* useful UI to create a new content instance from a master content. List, edit, remove a content instance and a simple drop-down to list all instance published (ready to use by end user)
* all services (with the work flexibleReport) to manage a flexible report, prepare the rptDesign skeleton, reanalyze the rptDesign uploaded, prepare the search form
* Services interface to define you own search custom method
* Two examples, one on the entity Exemple and one with the service flexibleReportTurnOver. Warning ! there are raw example without a beautiful rptDesign so you need to update the rptDesign with the birt editor to display something.
Thanks: François Wurmser for initialize this improvement, Jacques and Gil for their time to analyze, document and refactor the code
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/plugins@1780683 13f79535-47bb-0310-9956-ffa450edef68