Commit Graph
32 Commits
Author SHA1 Message Date
Pawan Verma 034e03abf4 Improved: Inconsistent String Comparisons(OFBIZ-9254)
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.
2020-07-30 17:01:54 +05:30
Priya SharmaandPriya Sharma 5a144c0bed Improved: Use GroovyBaseScript's makeValue utility methods in each Groovy files (OFBIZ-11779)
Co-authored-by: Priya Sharma <priya.sharma@hotwaxsystems.com>
2020-06-28 01:24:32 +05:30
Priya SharmaandPriya Sharma 15aec7e8f7 WIP: [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug (OFBIZ-11762) (#185)
* [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug
- Replaced the debug.log methods with the respective groovy utility method
- Enhanced the GroovyBaseScript to entertain the fetch the current class name as the module name for logging
- Overloaded the logError method to entertain throwbale object for better logging
- Removed unused import statements and module variables.

(OFBIZ-11762)

* [Removed]: Extra line spaces. (OFBIZ-11762)

* [Revert]: Unwanted changes. (OFBIZ-11762)

* [Added] Same changes to these files. (OFBIZ-11762)

Co-authored-by: Priya Sharma <priya.sharma@example.com>
2020-06-06 10:17:23 +02:00
Pawan Verma aa57e68088 Fixed: ViewShipment in facility does not show phone details(OFBIZ-11785)
Thanks, Pierre for the report.
2020-06-02 15:33:56 +05:30
Jacques Le Roux 8c3423ab00 Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

In many Java and Groovy files we have auto generated catch blocks or empty catch 
blocks. 
To avoid such exception swallowing this should be improved to at least log the 
error and also return error in case of service.

Missed this one in last commit

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866985 13f79535-47bb-0310-9956-ffa450edef68
2019-09-16 08:13:19 +00:00
Jacques Le Roux cfff42cdc4 Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

In many Java and Groovy files we have auto generated catch blocks or empty catch 
blocks. 
To avoid such exception swallowing this should be improved to at least log the 
error and also return error in case of service.

Last ones :)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866958 13f79535-47bb-0310-9956-ffa450edef68
2019-09-15 07:48:09 +00:00
Mathieu Lirzin 37b6edb2a6 Improved: Remove useless ‘UtilHttp#parametersToAttributes’
(OFBIZ-11138)

This method was so trivial that it doesn't make sense to provide it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863403 13f79535-47bb-0310-9956-ffa450edef68
2019-07-19 14:32:18 +00:00
Jacques Le Roux 28e119027c Improved: Use Groovy Truth instead of UtilValidate Class in Groovy
(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-framework/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 10:36:16 +00:00
Jacques Le Roux 2df068855b Improved: Java code contains unnecessary semicolons
(OFBIZ-10936)

Loosely related: Groovy code don't even needs them :)

Thanks: Mathieu for creating the Jira

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858220 13f79535-47bb-0310-9956-ffa450edef68
2019-04-26 18:09:39 +00:00
Jacques Le Roux 9712ec2963 Improved: function parseBigDecimalForEntity is in wrong location
(OFBIZ-10689)

After I changed the method name from  ObjectType::simpleTypeConvert to
ObjectType::simpleTypeOrObjectConvert, Shikha Jaiswal noticed that I missed 
the groovy files.

Checking further I found that I also missed the simple-methods.xsd and 
ObjectTypeTests.java (though this last one was no really a problem)

Thanks: Shikha Jaiswal 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851156 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 09:29:29 +00:00
Jacques Le Roux 3326a7ed5b Improved: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

Improves this "catch NumberFormatException", better message and return

Thanks: Michael Brohl for review


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824434 13f79535-47bb-0310-9956-ffa450edef68
2018-02-16 08:53:20 +00:00
Jacques Le Roux 4e721f189b Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

Fixes few remaining swallowed Exception in Groovy files.

Not sure if always showing an error message in ui is a good idea. 
But this should not happen too often and could help users to fix wrong passed 
numbers...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824294 13f79535-47bb-0310-9956-ffa450edef68
2018-02-15 11:01:41 +00:00
Jacques Le Roux b2de2b84a1 Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

Fixes few remaining swallowed "catch NumberFormatException" in Groovy files

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824157 13f79535-47bb-0310-9956-ffa450edef68
2018-02-13 16:34:12 +00:00
Arun Patidar 802ab3c5b1 Improved: Completed Service Order Items are being allowed to be received along with finished goods over Approved PO. (OFBIZ-7183)
Thanks Ankush Upadhyay and Swapnil Shah for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822393 13f79535-47bb-0310-9956-ffa450edef68
2018-01-27 11:44:05 +00:00
Jacques Le Roux 70b99a6db9 Reverts from r1821001 (for OFBIZ-10113) some unrelated files (pending changes)
that inadvertently slipped in.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821028 13f79535-47bb-0310-9956-ffa450edef68
2018-01-12 20:06:03 +00:00
Jacques Le Roux 19d9b3ca30 Improved: Replace Asm select plugin with Select2.
(OFBIZ-10113)

Current Asm Select Plugin 
http://www.ryancramer.com/journal/entries/asmselect_v104/
can be replaced with Select2 (https://select2.org/).

* Select2 has much better community support on GitHub with 386 contributors 
  while Asm Select Plugin is handled by Ryan Cramer on http://www.ryancramer.com/.
* Select2 has 37 releases while Asm select has very few releases yet.
* Both the plugin has MIT license.

Refer https://select2.org/ and  
https://github.com/select2/select2 for more features and other information.

Added i18n support so added logic in JsLanguageFileMappingCreator and 
JsLanguageFilesMapping accordingly.
Added some custom CSS as the Select2 seems to be too fancy in accordance 
with the current OFBiz themes

Verify:
Multiple drop-downs field in FormWidgetExamples.
https://localhost:8443/example/control/FormWidgetExamples

Find Request page with StatusId , CustRequestId
https://localhost:8443/ordermgr/control/FindRequest

I have replaced the plugins though I feel the implementation of select multiple 
js code is to be reviewed & refactored. I will pick when I am done with all my 
current tasks if I get some consensus.

Thanks: Aditya 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821001 13f79535-47bb-0310-9956-ffa450edef68
2018-01-12 15:47:47 +00:00
Jacques Le Roux cdbb16d292 Implemented: Accounting: Handle service response effectively
(OFBIZ-10021)

This uses return ServiceUtil.returnError() in case of ServiceUtil.isError()

jleroux: I applied the fix to GiftCertificateServices by hand

Thanks: Suraj Khurana

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817456 13f79535-47bb-0310-9956-ffa450edef68
2017-12-08 05:26:28 +00:00
Jacques Le Roux 01a2eb476a Fixed: Inventory Report PDF lists all available statusId's irrespective of
selection criteria
(OFBIZ-7438)

1. Go to Facility -> Inventory 
2. Select a status and perform find
3. Click on Print pdf button

Expected: PDF should show selected statusId
Actual: All available statusId's in the system get listed in the Pdf.

Thanks: Arvind Singh Tomar

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814591 13f79535-47bb-0310-9956-ffa450edef68
2017-11-08 15:42:16 +00:00
Arun Patidar d995b1c130 Improved: Improvements in OrderHeader entity definition and services. (OFBIZ-9457)
Thanks Rishi solanki and Aishwary Shrivastav for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801310 13f79535-47bb-0310-9956-ffa450edef68
2017-07-08 18:38:17 +00:00
Deepak Dixit 14f9c7331d Improved: Following uiLabels should move from ProductUiLabels.xml to CommonEntityLabels.xml. (OFBIZ-9408)
ProductShipmentUomAbbreviation_LEN_in
    ProductShipmentUomAbbreviation_WT_g
    ProductShipmentUomAbbreviation_WT_kg
    ProductShipmentUomAbbreviation_WT_lb
    These labels should be written in similer pattern as other labels of "Uom" entity are written in CommonEntityLabels.xml, for example :
    ProductShipmentUomAbbreviation_LEN_in will be written as
    Uom.abbreviation.LEN_in
    <entityName>.<fieldName>.<PrimaryKey>

Thanks Renuka for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801281 13f79535-47bb-0310-9956-ffa450edef68
2017-07-08 11:36:50 +00:00
Deepak Dixit d5bcaaedf8 Improved: Inconsistent String Comparisons, Applied application groovy patch from jira issue. (OFBIZ-9254)
I found an inconsistency 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 Vyas for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1795341 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 17:16:05 +00:00
Jacques Le Roux 0a5b1646b7 No functional changes
At http://markmail.org/message/ffmyw773p65fndey I wrote:

I'd like to follow the suggestion I made in the last message of the linked 
thread.
In other words, use
http://subversion.apache.org/docs/release-notes/1.8.html#repos-dictated-config
http://blogs.collab.net/subversion/the-road-to-repository-dictated-configuration-day-2-autoprops
Then this problem would be over. No longer need to check from time to time that
concerned files, have svn:eol-style=native property set
This imply that all OFBiz users use svn > 1.7, but we can inform them, et voilà

Then at markmail.org/message/h3q2yvj4db544ro7 I wrote:

Actually, since we get new committers now and then and their are able to create
new files I have a warning every 6 months which says "Check Java 
files, have all svn:eol-style=native" (I totally forgot that because I assume
the machine knows it and warns me ;))
I could extend that to all files (at least the most prominent types), I'll
see...

This does what the last sentence said for Groovy, XML and few new Birt 
Java files.

I'll see if I can implement the svn 1.8 repos-dictated-config ASAP!




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781219 13f79535-47bb-0310-9956-ffa450edef68
2017-02-01 10:58:46 +00:00
Arun Patidar 2bfc816e9b Improved: Removed semicolon from all Groovy files of all components.
(OFBIZ-8652)

Thanks: Rohit Koushal, Jacques Le Roux and Rishi Solanki for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1767764 13f79535-47bb-0310-9956-ffa450edef68
2016-11-02 19:09:13 +00:00
Ashish Vijaywargiya 4e652d8631 Applied patch from jira issue - OFBIZ-8075 - Clean up commented out code in Groovy for Product. Thanks Aman for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759146 13f79535-47bb-0310-9956-ffa450edef68
2016-09-04 06:38:03 +00:00
Deepak Dixit 300a93a114 (OFBIZ-7390) Applied patch from jira issue:
================================
Print PDF functionality throws exception on Inventory Average Cost screen
================================
Thanks Avnindra Sharma for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758997 13f79535-47bb-0310-9956-ffa450edef68
2016-09-02 17:44:55 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Ashish Vijaywargiya c296436d2d Applied patch from jira issue -OFBIZ-7573 - Remove unused import related to HtmlFormWrapper and unused file using it.
Thanks Ravi for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750304 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 08:04:29 +00:00
Deepak Dixit 34b586d227 (OFBIZ-6144) Applied patch jira issue.
===========================================
Convert FindShipment ftl to form widget
===========================================

Thanks  Christian Carlow and Pawan for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750240 13f79535-47bb-0310-9956-ffa450edef68
2016-06-26 09:18:56 +00:00
Arun Patidar a91b9edae9 Applied patch from ticket - OFBIZ-7339 - Replace EntityUtilProperties getPropertyValue method with correct method calls. Thanks Rahul Singh Kushwah and Rishi Solanki for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749882 13f79535-47bb-0310-9956-ffa450edef68
2016-06-23 13:10:51 +00:00
Divesh Dutta 9e77d56a4a [OFBIZ-7106] Fixed: Pop up to show the existing inventory againt Purchase Return shipments is showing Zero ATP inventory against the Product need to be returned. Thanks Ankush Upadhyay for the patch and Swapnil Shah for reporting the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749118 13f79535-47bb-0310-9956-ffa450edef68
2016-06-19 01:15:34 +00:00
Mridul Pathak 55925cb9f6 [OFBIZ-7186] Find Facility Inventory Items shows same 20 items on all pagination page. Thanks Arvind Singh Tomar for reporting the issue and providing the patch. Thanks Montalbano Florian for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748950 13f79535-47bb-0310-9956-ffa450edef68
2016-06-18 10:18:13 +00:00
Deepak Dixit fcf9d19f5b (OFBIZ-7229) Relocate .groovy files in the product component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747774 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 18:46:51 +00:00