Commit Graph
13 Commits
Author SHA1 Message Date
Akash Jain 6a7136ada4 Fixed: Error on removing scrum members (OFBIZ-7249)
Thanks, Anurag Chandak for report.
2020-09-01 15:11:34 +05:30
Pawan Verma b7ef54d494 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:02:52 +05:30
Priya SharmaandPriya Sharma dd1d408bc8 [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug (OFBIZ-11762) (#24)
* [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>
2020-06-08 13:39:42 +02:00
Jacques Le Roux f3c3271d12 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-plugins/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 10:36:16 +00:00
Deepak Dixit c86422ce7c Scrum : Remove unused imports from groovy files for code optimization.
Applied slightly modified patch from jira issue (OFBIZ-9511)
Thanks  Suraj Khurana and Pradeep Choudhary for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1806324 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 19:50:12 +00:00
Pranay Pandey fb81beeae4 Fixed: SCRUM - Error on 'Edit backlog' for a product.
(OFBIZ-9531)

Added missing import for GenericEntityException and defined customer and items list at right place to make it available.

Thanks Pallavi Goyal for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1802965 13f79535-47bb-0310-9956-ffa450edef68
2017-07-25 15:19:45 +00:00
Jacques Le Roux c1f51f2b54 Improved: performFindResults.listIt closed but not in case of exception in 3
Scrum Groovy files
(OFBIZ-9389)

This is an improvement only because no cases were reported. But obviously in 
case of unlucky exception after the call to the performFind service, and before 
it's closed, the EntityListIterator remains in memory.

The solution is to use a try-catch-finally block because Groovy has not 
try-with-ressources.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1797788 13f79535-47bb-0310-9956-ffa450edef68
2017-06-06 13:59:29 +00:00
Deepak Dixit 18894e6dc0 Improved: Inconsistent String Comparisons, Applied plugins 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-plugins/trunk@1795344 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 17:36:32 +00:00
Arun Patidar 8bb8f78872 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/specialpurpose@1767764 13f79535-47bb-0310-9956-ffa450edef68
2016-11-02 19:09:13 +00:00
Jacques Le Roux 4417afdfd3 An improving patch from Florian Montalbano for "Scrum find Total Backlog Item is not working in non-English language" https://issues.apache.org/jira/browse/OFBIZ-7929
I put it all in this new version of the patch :
    Changed UtilValidate test to Groovy Truth test on string
    Changed the big first test by a test on "noConditionFind"
    Added some comments
    Harmonization of the "if tests"
    Removed the uiLabelMap.CommonAny in the file (the two others belonged to another form --> "FindTotalBacklog")
    Added a "noConditionFind" field to this form --> "FindTotalBacklog"

jleroux: I removed all remaining tabs in FindProductBacklogItem.groovy

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1754656 13f79535-47bb-0310-9956-ffa450edef68
2016-07-31 12:13:03 +00:00
Jacques Le Roux 8e3d7dfaef A patch from Florian Montalbano for "Scrum find Total Backlog Item is not working in non-English language" https://issues.apache.org/jira/browse/OFBIZ-7929
The Find form for Product Backlog Item does not work in language other than English when no "statusId" or "custRequestTypeId" are selected.

Step to reproduce :
- Go to the Scrum component and select a product
- Go to the "Total Backlog" tab
or use this link : https://localhost:8443/scrum/control/ViewTotalBacklog?productId=DEMO-PRODUCT-1

- Hit the search button, the find action is performed and return a non-empty list.
- Set your language preference to a non english language (french for example). 
- Click again on the "Total Backlog" tab, and hit the  "Rechercher" button.
- No results are found.

Where does the problem come from ?
The results displayed are from a list named "backlogList" which is built in the following script : FindProductBacklogItem.groovy .
In this script, there were a check on the parameter "custRequestTypeId" and on the parameter "statusId".
But the value was hardcoded :

if("Any".equals(parameters.custRequestTypeId))
and
if(!"Any".equals(parameters.statusId))

Obviously, when the form is in another language than English, those conditions aren't valid anymore (for example, "Any" is "Don't" in French")

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1754051 13f79535-47bb-0310-9956-ffa450edef68
2016-07-25 21:38:11 +00:00
Deepak Dixit 8f3141cd46 (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/specialpurpose@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Deepak Dixit 4a98e38766 (OFBIZ-7243) Relocate .groovy files in the specialpurpose/scrums component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1747795 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 19:58:55 +00:00