svn commit: r39179 - /release/ofbiz/README.html
Author: jacopoc Date: Wed Apr 29 14:02:34 2020 New Revision: 39179 Log: Update release history in the release repository. Modified: release/ofbiz/README.html Modified: release/ofbiz/README.html == --- release/ofbiz/README.html (original) +++ release/ofbiz/README.html Wed Apr 29 14:02:34 2020 @@ -4,6 +4,8 @@ Note: old releases can be downloaded fro 17.12 series This series has been stabilized with bug fixes since December 2017. +apache-ofbiz-17.12.03.zip - Released in April 2020. http://ofbiz.apache.org/release-notes-17.12.03.html;>Release notes. +apache-ofbiz-17.12.02.zip - Released in April 2020. apache-ofbiz-17.12.01.zip - Released in March 2020. http://ofbiz.apache.org/release-notes-17.12.01.html;>Release notes.
svn commit: r1877169 - in /ofbiz/site: download.html release-notes-17.12.03.html template/page/download.tpl.php template/page/release-notes-17.12.03.tpl.php
Author: jacopoc Date: Wed Apr 29 13:59:53 2020 New Revision: 1877169 URL: http://svn.apache.org/viewvc?rev=1877169=rev Log: Publish new release information in the website. Added: ofbiz/site/release-notes-17.12.03.html (with props) ofbiz/site/template/page/release-notes-17.12.03.tpl.php Modified: ofbiz/site/download.html ofbiz/site/template/page/download.tpl.php Modified: ofbiz/site/download.html URL: http://svn.apache.org/viewvc/ofbiz/site/download.html?rev=1877169=1877168=1877169=diff == --- ofbiz/site/download.html (original) +++ ofbiz/site/download.html Wed Apr 29 13:59:53 2020 @@ -128,16 +128,16 @@ - OFBiz 17.12.01 - https://www.apache.org/dyn/closer.lua/ofbiz/apache-ofbiz-17.12.01.zip; target="external" class="moreLink"> Download + OFBiz 17.12.03 + https://www.apache.org/dyn/closer.lua/ofbiz/apache-ofbiz-17.12.03.zip; target="external" class="moreLink"> Download - OFBiz 17.12.01 - View + OFBiz 17.12.03 + View @@ -152,14 +152,14 @@ Use the links below to download Apache OFBiz releases from the "Apache Download Mirrors" page. The download page also includes instructions on how to verify the integrity of the release file using the signature and hash (PGP, SHA512) available for each release. If you need more information about why and how to verify the integrity of the release file http://www.apache.org/info/verification.html; class="moreLink">this page is what you look for PLEASE NOTE: Despite our best efforts to maintain up to three active release branches, support for older branches can decrease because our project volunteers may be focused on other issues. We recommend using releases from the most recent branch wherever possible. -Apache OFBiz 17.12.01 +Apache OFBiz 17.12.03 - Released in March 2020, this is the first release of the 17.12 series, that has been stabilized since December 2017. -https://www.apache.org/dyn/closer.lua/ofbiz/apache-ofbiz-17.12.01.zip; target="external" >Download OFBiz 17.12.01 -https://downloads.apache.org/ofbiz/apache-ofbiz-17.12.01.zip.asc; target="external">[PGP] -https://downloads.apache.org/ofbiz/apache-ofbiz-17.12.01.zip.sha512; target="external">[SHA512] + Released in April 2020, this is the third release of the 17.12 series, that has been stabilized since December 2017. +https://www.apache.org/dyn/closer.lua/ofbiz/apache-ofbiz-17.12.03.zip; target="external" >Download OFBiz 17.12.03 +https://downloads.apache.org/ofbiz/apache-ofbiz-17.12.03.zip.asc; target="external">[PGP] +https://downloads.apache.org/ofbiz/apache-ofbiz-17.12.03.zip.sha512; target="external">[SHA512] https://downloads.apache.org/ofbiz/KEYS; target="external">[KEYS] -[Release Notes] +[Release Notes] Earlier Releases Added: ofbiz/site/release-notes-17.12.03.html URL: http://svn.apache.org/viewvc/ofbiz/site/release-notes-17.12.03.html?rev=1877169=auto == --- ofbiz/site/release-notes-17.12.03.html (added) +++ ofbiz/site/release-notes-17.12.03.html Wed Apr 29 13:59:53 2020 @@ -0,0 +1,279 @@ + + + + + + + + +The Apache OFBiz Project - Release Notes 17.12.03 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Home +Getting Started + +Developers +Business Users + + +News + +Twitter +Blog + + +Documentation + +User Documentation +Technical Documentation +Wiki +API Reference + + +Community + +Getting Involved +Mailing Lists +Source Repository +Downloads +Issue Tracker +FAQ + + +Demos + + twitter + + Youtube + facebook + + + + + + + + + + + + + + + + Release Notes 17.12.03 + home/Download/Release Notes
[ofbiz-framework] branch trunk updated: Improved: Converted cancelFixedAssetStdCost service from simple to entity-auto. (#80)
This is an automated email from the ASF dual-hosted git repository. surajk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new f527bf4 Improved: Converted cancelFixedAssetStdCost service from simple to entity-auto. (#80) f527bf4 is described below commit f527bf4dc08c2f17cb93cdad7a63622f922fa03d Author: Suraj Khurana <64310724+surajkhur...@users.noreply.github.com> AuthorDate: Wed Apr 29 18:47:34 2020 +0530 Improved: Converted cancelFixedAssetStdCost service from simple to entity-auto. (#80) * Improved: Converted cancelFixedAssetStdCost service from simple to entity-auto. (OFBIZ-11612) --- applications/accounting/minilang/fixedasset/FixedAssetServices.xml | 7 --- applications/accounting/servicedef/services_fixedasset.xml | 6 +++--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/applications/accounting/minilang/fixedasset/FixedAssetServices.xml b/applications/accounting/minilang/fixedasset/FixedAssetServices.xml index 10af8a2..35d805a 100644 --- a/applications/accounting/minilang/fixedasset/FixedAssetServices.xml +++ b/applications/accounting/minilang/fixedasset/FixedAssetServices.xml @@ -21,13 +21,6 @@ under the License. http://www.w3.org/2001/XMLSchema-instance; xmlns="http://ofbiz.apache.org/Simple-Method; xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd;> - - - - - - - diff --git a/applications/accounting/servicedef/services_fixedasset.xml b/applications/accounting/servicedef/services_fixedasset.xml index 47bdf2a..9fbb432 100644 --- a/applications/accounting/servicedef/services_fixedasset.xml +++ b/applications/accounting/servicedef/services_fixedasset.xml @@ -74,9 +74,9 @@ under the License. - -Cancel a Fixed Asset Standard Cost + + +Expire a Fixed Asset Standard Cost
[ofbiz-framework] branch trunk updated: Improved: Sales Invoice creation should be limited for customer parties only. (OFBIZ-11023) Thanks Pierre Smits for reporting and Rohit Hukkeri for the patch
This is an automated email from the ASF dual-hosted git repository. surajk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new 0269e7b Improved: Sales Invoice creation should be limited for customer parties only. (OFBIZ-11023) Thanks Pierre Smits for reporting and Rohit Hukkeri for the patch 0269e7b is described below commit 0269e7b05fc83841b99843783c247188963d2221 Author: Suraj Khurana AuthorDate: Wed Apr 29 17:05:04 2020 +0530 Improved: Sales Invoice creation should be limited for customer parties only. (OFBIZ-11023) Thanks Pierre Smits for reporting and Rohit Hukkeri for the patch --- applications/accounting/widget/InvoiceForms.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/accounting/widget/InvoiceForms.xml b/applications/accounting/widget/InvoiceForms.xml index 620f4c9..25691b4 100644 --- a/applications/accounting/widget/InvoiceForms.xml +++ b/applications/accounting/widget/InvoiceForms.xml @@ -259,7 +259,7 @@ under the License. - +
[ofbiz-framework] branch trunk updated: Improved: Use userLogin available in context instead of fetching from DB in Groovy test cases (OFBIZ-11618)
This is an automated email from the ASF dual-hosted git repository. pawan pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new b613256 Improved: Use userLogin available in context instead of fetching from DB in Groovy test cases (OFBIZ-11618) b613256 is described below commit b613256823163780ad1475fe43b8890b57b06a07 Author: Pawan Verma AuthorDate: Wed Apr 29 16:26:58 2020 +0530 Improved: Use userLogin available in context instead of fetching from DB in Groovy test cases (OFBIZ-11618) Thanks: Jacques for the review. --- .../ofbiz/accounting/AutoAcctgAdminTests.groovy| 26 +++--- .../ofbiz/accounting/AutoAcctgBudgetTests.groovy | 4 ++-- .../ofbiz/accounting/AutoAcctgCostTests.groovy | 2 +- .../ofbiz/accounting/AutoAcctgInvoiceTests.groovy | 10 - .../ofbiz/accounting/AutoAcctgLedgerTests.groovy | 2 +- .../accounting/AutoAcctgPaymentGatewayTests.groovy | 2 +- .../ofbiz/accounting/AutoAcctgPaymentTests.groovy | 6 ++--- .../org/apache/ofbiz/content/ContentTests.groovy | 2 +- .../org/apache/ofbiz/order/OrderReturnTests.groovy | 12 +- .../org/apache/ofbiz/order/QuoteTests.groovy | 2 +- .../order/TestCustRequestPermissionCheck.groovy| 2 +- .../ofbiz/product/ProductFeatureTypeTests.groovy | 2 +- .../org/apache/ofbiz/product/ProductTests.groovy | 2 +- 13 files changed, 32 insertions(+), 42 deletions(-) diff --git a/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/AutoAcctgAdminTests.groovy b/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/AutoAcctgAdminTests.groovy index d5d2e4e..b7bce03 100644 --- a/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/AutoAcctgAdminTests.groovy +++ b/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/AutoAcctgAdminTests.groovy @@ -43,7 +43,7 @@ class AutoAcctgAdminTests extends OFBizTestCase { paymentMethodTypeId: 'GIFT_CARD', organizationPartyId: 'DEMO_COMPANY1', glAccountId: '99', -userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').queryOne() +userLogin: userLogin ] Map serviceResult = dispatcher.runSync('addPaymentMethodTypeGlAssignment', serviceCtx) assert ServiceUtil.isSuccess(serviceResult) @@ -60,7 +60,7 @@ class AutoAcctgAdminTests extends OFBizTestCase { Map serviceCtx = [ paymentTypeId: 'COMMISSION_PAYMENT', organizationPartyId: 'DEMO_COMPANY1', -userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').queryOne() +userLogin: userLogin ] Map serviceResult = dispatcher.runSync('removePaymentTypeGlAssignment', serviceCtx) assert ServiceUtil.isSuccess(serviceResult) @@ -76,7 +76,7 @@ class AutoAcctgAdminTests extends OFBizTestCase { Map serviceCtx = [ partyId: 'DEMO_COMPANY', refundPaymentMethodId: '9020', -userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').queryOne() +userLogin: userLogin ] Map serviceResult = dispatcher.runSync('createPartyAcctgPreference', serviceCtx) assert ServiceUtil.isSuccess(serviceResult) @@ -93,7 +93,7 @@ class AutoAcctgAdminTests extends OFBizTestCase { Map serviceCtx = [ partyId: 'DEMO_COMPANY1', refundPaymentMethodId: '9020', -userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').queryOne() +userLogin: userLogin ] Map serviceResult = dispatcher.runSync('updatePartyAcctgPreference', serviceCtx) assert ServiceUtil.isSuccess(serviceResult) @@ -108,7 +108,7 @@ class AutoAcctgAdminTests extends OFBizTestCase { void testGetPartyAccountingPreferences() { Map serviceCtx = [ organizationPartyId: 'DEMO_COMPANY1', -userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').queryOne() +userLogin: userLogin ] Map serviceResult = dispatcher.runSync('getPartyAccountingPreferences', serviceCtx) assert ServiceUtil.isSuccess(serviceResult) @@ -118,7 +118,7 @@ class AutoAcctgAdminTests extends OFBizTestCase { void testSetAcctgCompany() { Map serviceCtx = [ organizationPartyId: 'DEMO_COMPANY1', -userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').queryOne() +userLogin: userLogin ] Map serviceResult = dispatcher.runSync('setAcctgCompany', serviceCtx) assert
[ofbiz-framework] branch trunk updated: Improved: Updated hard coded values of location types and used all available location enums instead. (OFBIZ-6042) Thanks Pierre for reporting and Jacques Le Rou
This is an automated email from the ASF dual-hosted git repository. surajk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new faf0699 Improved: Updated hard coded values of location types and used all available location enums instead. (OFBIZ-6042) Thanks Pierre for reporting and Jacques Le Roux for review. faf0699 is described below commit faf0699e0dfcf831e24e4ffe9780b3aad8444fa7 Author: Suraj Khurana AuthorDate: Wed Apr 29 15:57:48 2020 +0530 Improved: Updated hard coded values of location types and used all available location enums instead. (OFBIZ-6042) Thanks Pierre for reporting and Jacques Le Roux for review. --- .../product/minilang/product/inventory/InventoryServices.xml | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/applications/product/minilang/product/inventory/InventoryServices.xml b/applications/product/minilang/product/inventory/InventoryServices.xml index ee469e8..a543886 100644 --- a/applications/product/minilang/product/inventory/InventoryServices.xml +++ b/applications/product/minilang/product/inventory/InventoryServices.xml @@ -1076,10 +1076,11 @@ under the License. - - - + + + +
[ofbiz-framework] branch trunk updated: Improved: Added support for EntityQuery methods in OFBiz integration tests. (OFBIZ-11247)
This is an automated email from the ASF dual-hosted git repository. pawan pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new 1b3d3bd Improved: Added support for EntityQuery methods in OFBiz integration tests. (OFBIZ-11247) 1b3d3bd is described below commit 1b3d3bdf4e4ebcf3597a2bb97b22c41cbe20cf6c Author: Pawan Verma AuthorDate: Wed Apr 29 15:28:42 2020 +0530 Improved: Added support for EntityQuery methods in OFBiz integration tests. (OFBIZ-11247) Thanks: Jacques for the review. --- .../apache/ofbiz/service/testtools/OFBizTestCase.java | 19 +++ 1 file changed, 19 insertions(+) diff --git a/framework/service/src/main/java/org/apache/ofbiz/service/testtools/OFBizTestCase.java b/framework/service/src/main/java/org/apache/ofbiz/service/testtools/OFBizTestCase.java index 4ba8488..257ae47 100644 --- a/framework/service/src/main/java/org/apache/ofbiz/service/testtools/OFBizTestCase.java +++ b/framework/service/src/main/java/org/apache/ofbiz/service/testtools/OFBizTestCase.java @@ -21,10 +21,13 @@ package org.apache.ofbiz.service.testtools; import org.apache.ofbiz.entity.GenericEntityException; import org.apache.ofbiz.entity.GenericValue; +import org.apache.ofbiz.entity.model.DynamicViewEntity; import org.apache.ofbiz.entity.testtools.EntityTestCase; import org.apache.ofbiz.entity.util.EntityQuery; import org.apache.ofbiz.service.LocalDispatcher; +import java.util.Set; + public class OFBizTestCase extends EntityTestCase { protected LocalDispatcher dispatcher = null; @@ -53,4 +56,20 @@ public class OFBizTestCase extends EntityTestCase { protected GenericValue getUserLogin() throws GenericEntityException { return getUserLogin("system"); } + +protected EntityQuery from(String entityName) { +return EntityQuery.use(delegator).from(entityName); +} + +protected EntityQuery from(DynamicViewEntity dynamicViewEntity) { +return EntityQuery.use(delegator).from(dynamicViewEntity); +} + +protected EntityQuery select(String... fields) { +return EntityQuery.use(delegator).select(fields); +} + +protected EntityQuery select(Set fields) { +return EntityQuery.use(delegator).select(fields); +} }
[ofbiz-framework] branch trunk updated: Fixed: The producttests test suite is brooken (OFBIZ-11620)
This is an automated email from the ASF dual-hosted git repository. pawan pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new 0f777b7 Fixed: The producttests test suite is brooken (OFBIZ-11620) 0f777b7 is described below commit 0f777b7de26c442c8dbfd91e27fc007bc9b3298a Author: Pawan Verma AuthorDate: Wed Apr 29 14:53:26 2020 +0530 Fixed: The producttests test suite is brooken (OFBIZ-11620) Corrected Class name and ProductAssoc entity name. Thanks: Jacques for the partial fix. --- .../product/groovyScripts/product/product/ProductServices.groovy | 2 +- .../groovy/org/apache/ofbiz/product/ProductPromoActionTests.groovy| 4 ++-- .../main/groovy/org/apache/ofbiz/product/ProductPromoCondTests.groovy | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/applications/product/groovyScripts/product/product/ProductServices.groovy b/applications/product/groovyScripts/product/product/ProductServices.groovy index a520130..80c85d9 100644 --- a/applications/product/groovyScripts/product/product/ProductServices.groovy +++ b/applications/product/groovyScripts/product/product/ProductServices.groovy @@ -340,7 +340,7 @@ def discontinueProductSales() { delegator.storeByCondition("ProductCategoryMember", [thruDate: nowTimestamp], condition) // expire product from all associations going to it -delegator.storeByCondition("ProducAssoc", +delegator.storeByCondition("ProductAssoc", [thruDate: nowTimestamp], condition) return success() } diff --git a/applications/product/src/main/groovy/org/apache/ofbiz/product/ProductPromoActionTests.groovy b/applications/product/src/main/groovy/org/apache/ofbiz/product/ProductPromoActionTests.groovy index 72cbf8f..cbf7264 100644 --- a/applications/product/src/main/groovy/org/apache/ofbiz/product/ProductPromoActionTests.groovy +++ b/applications/product/src/main/groovy/org/apache/ofbiz/product/ProductPromoActionTests.groovy @@ -35,8 +35,8 @@ import org.apache.ofbiz.service.ServiceUtil import java.sql.Timestamp import java.util.Map -class ProductPromoActionTest extends OFBizTestCase { -public ProductPromoActionTest(String name) { +class ProductPromoActionTests extends OFBizTestCase { +public ProductPromoActionTests(String name) { super(name) } diff --git a/applications/product/src/main/groovy/org/apache/ofbiz/product/ProductPromoCondTests.groovy b/applications/product/src/main/groovy/org/apache/ofbiz/product/ProductPromoCondTests.groovy index d463530..b1f59e5 100644 --- a/applications/product/src/main/groovy/org/apache/ofbiz/product/ProductPromoCondTests.groovy +++ b/applications/product/src/main/groovy/org/apache/ofbiz/product/ProductPromoCondTests.groovy @@ -27,8 +27,8 @@ import org.apache.ofbiz.order.shoppingcart.ShoppingCart import org.apache.ofbiz.service.testtools.OFBizTestCase import org.apache.ofbiz.service.ServiceUtil -class ProductPromoCondTest extends OFBizTestCase { -public ProductPromoCondTest(String name) { +class ProductPromoCondTests extends OFBizTestCase { +public ProductPromoCondTests(String name) { super(name) }
buildbot failure in on ofbizTrunkFramework
The Buildbot has detected a new failure on builder ofbizTrunkFramework while building ofbiz-framework. Full details are available at: https://ci.apache.org/builders/ofbizTrunkFramework/builds/1402 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf947_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'onTrunkFrameworkCommit' triggered this build Build Source Stamp: [branch trunk] 649614507bab6ff955e243a5858c1353150dfd42 Blamelist: Jacques Le Roux BUILD FAILED: failed shell_2 Sincerely, -The Buildbot
[ofbiz-framework] branch trunk updated: Fixed: The producttests test suite is brooken
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new 6496145 Fixed: The producttests test suite is brooken 6496145 is described below commit 649614507bab6ff955e243a5858c1353150dfd42 Author: Jacques Le Roux AuthorDate: Wed Apr 29 10:02:07 2020 +0200 Fixed: The producttests test suite is brooken (OFBIZ-11620) It was initially broken by OFBIZ-9905 so only trunk was concerned. The fix is simple: there should be no space at the beginning of the file. But then, when running the test suite, other issues raise. I guess they were hidden because of the initial issue. OFBIZ-10231 introduced 2 issues A syntax error: product.removeRelated("ProductKeyword", product) instead of product.removeRelated("ProductKeyword") A wrong usage of storeByCondition This fixes the 3 issues, to test: gradlew "ofbiz --test component=product --test suitename=producttests" Thanks: Pawan for initial report --- .../groovyScripts/product/product/ProductServices.groovy | 16 ++-- applications/product/testdef/ProductTest.xml | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/applications/product/groovyScripts/product/product/ProductServices.groovy b/applications/product/groovyScripts/product/product/ProductServices.groovy index 21daa81..a520130 100644 --- a/applications/product/groovyScripts/product/product/ProductServices.groovy +++ b/applications/product/groovyScripts/product/product/ProductServices.groovy @@ -21,6 +21,7 @@ import org.apache.ofbiz.base.util.UtilDateTime import org.apache.ofbiz.base.util.UtilProperties import org.apache.ofbiz.base.util.UtilValidate +import org.apache.ofbiz.entity.condition.EntityConditionBuilder import org.apache.ofbiz.entity.GenericValue import org.apache.ofbiz.entity.serialize.XmlSerializer import org.apache.ofbiz.product.product.KeywordIndex @@ -296,7 +297,7 @@ def forceIndexProductKeywords() { */ def deleteProductKeywords() { GenericValue product = from("Product").where(parameters).cache().queryOne() -product.removeRelated("ProductKeyword", product) +product.removeRelated("ProductKeyword") return success() } @@ -329,15 +330,18 @@ def discontinueProductSales() { product.salesDiscontinuationDate = nowTimestamp product.store() + // expire product from all categories +exprBldr = new EntityConditionBuilder() +condition = exprBldr.AND() { +EQUALS(productId: product.productId) +EQUALS(thruDate: null) +} delegator.storeByCondition("ProductCategoryMember", -[thruDate: nowTimestamp], -[productId: product.productId, thruDate: null]) - +[thruDate: nowTimestamp], condition) // expire product from all associations going to it delegator.storeByCondition("ProducAssoc", -[thruDate: nowTimestamp], -[productIdTo: product.productId, thruDate: null]) +[thruDate: nowTimestamp], condition) return success() } diff --git a/applications/product/testdef/ProductTest.xml b/applications/product/testdef/ProductTest.xml index 2dc1ba5..e67e2cc 100644 --- a/applications/product/testdef/ProductTest.xml +++ b/applications/product/testdef/ProductTest.xml @@ -1,4 +1,4 @@ - +
[ofbiz-framework] branch trunk updated: Fixed: "entity/list" request is not handled well
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new 61e5435 Fixed: "entity/list" request is not handled well 61e5435 is described below commit 61e5435b301bfe8825ce2c0abb10ee15fb872964 Author: Jacques Le Roux AuthorDate: Wed Apr 29 06:57:52 2020 +0200 Fixed: "entity/list" request is not handled well (OFBIZ-11593) The "entity/list" request has been put in with OFBIZ-11007. It's used to call the entitymaint view and so is a demo/didactic duplicate of entitymaint request. It's only used in FindGeneric screen (look for WebtoolsBackToEntityList label). It's problematic because since the CSRF token defense was put in you can no longer filter the entities from the entities list screen, even when the default NoCsrfDefenseStrategy is used. It works if you use the entitymaint request instead. 2020-01-19 I proposed in OFBIZ-11306 a solution for such cases. It was not used because 2020-02-14 I thought it was no longer needed. It was necessary for this case and implemented with commit e487122. But as, Rohit Koushal reported, it breaks some functionalities like adding address/update address during Quick Finalize Order. The issue can also be reproduced in ecommerce when trying the same while checking out, or quick checking out, an order. More generally the error is of this kind: |27.0.0.1-8009-exec-3 |ControlServlet|E| Error in request handler: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.LinkedList.checkElementIndex(LinkedList.java:555) ~[?:1.8.0_252] at java.util.LinkedList.get(LinkedList.java:476) ~[?:1.8.0_252] at org.apache.ofbiz.webapp.control.RequestHandler.getRequestUri(RequestHandler.java:837) ~[main/:?] and happens with URLs like updateCheckoutOptions/editcontactmech?DONE_PAGE=checkoutoptions=9015 or updateCheckoutOptions/editcontactmech?preContactMechTypeId=POSTAL_ADDRESS& contactMechPurposeTypeId=SHIPPING_LOCATION_PAGE=checkoutoptions So I decided to revert the concerned part of commit e487122 and to rather use entitymaint instead of "entity/list" request. --- .../org/apache/ofbiz/webapp/control/RequestHandler.java| 7 +-- .../apache/ofbiz/webapp/control/RequestHandlerTests.java | 14 -- framework/webtools/widget/EntityScreens.xml| 3 ++- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java index 166a5d7..84f91e4 100644 --- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java +++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java @@ -43,7 +43,6 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import javax.ws.rs.core.MultivaluedHashMap; -import org.apache.commons.lang3.StringUtils; import org.apache.cxf.jaxrs.model.URITemplate; import org.apache.ofbiz.base.location.FlexibleLocation; import org.apache.ofbiz.base.util.Debug; @@ -833,11 +832,7 @@ public class RequestHandler { if (pathInfo.get(0).indexOf('?') > -1) { return pathInfo.get(0).substring(0, pathInfo.get(0).indexOf('?')); } else { -if (1 < StringUtils.countMatches(path, "/")) { -return pathInfo.get(0) + "/" + pathInfo.get(1); -} else { -return pathInfo.get(0); -} +return pathInfo.get(0); } } diff --git a/framework/webapp/src/test/java/org/apache/ofbiz/webapp/control/RequestHandlerTests.java b/framework/webapp/src/test/java/org/apache/ofbiz/webapp/control/RequestHandlerTests.java index 183f0b0..53d760d 100644 --- a/framework/webapp/src/test/java/org/apache/ofbiz/webapp/control/RequestHandlerTests.java +++ b/framework/webapp/src/test/java/org/apache/ofbiz/webapp/control/RequestHandlerTests.java @@ -27,9 +27,9 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.times; import java.security.cert.X509Certificate; import java.util.ArrayList; @@ -185,14 +185,16 @@ public class RequestHandlerTests { @Test public void resolveURIBasicOverrideView() throws Exception { -RequestMap foobar = new RequestMap(dummyElement); -