While exploring the manufacturing code I observed on the find screen BOM type is
set hardcoded. We can improve it by using the entity-option tag to allow all
ProductAssocType with parentTypeId equals "PRODUCT_COMPONENT".
Thanks: Nameet Jain
* [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>
(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
(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
(OFBIZ-10648)
Bill of Materials search returning duplicate entries in search results.
Test Steps:
1. Login to Manufacturing application.
2. Navigate to Bill of Materials tab.
3. Observe the issue in Search results.
Expected Result:
Unique products should be displayed on Bill of Materials search results.
Actual Result:
Bill of Materials search returning duplicate entries in search results.
The distinct constraint is missing in FindProductBom.groovy find query.
Thanks: Aditya Barve
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846594 13f79535-47bb-0310-9956-ffa450edef68
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