You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2016/06/23 04:21:24 UTC

svn commit: r1749813 - /ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/product/ProductEvents.java

Author: ashish
Date: Thu Jun 23 04:21:24 2016
New Revision: 1749813

URL: http://svn.apache.org/viewvc?rev=1749813&view=rev
Log:
Applied bug fix from trunk r1749809.
==========================================================
Applied patch from jira issue - OFBIZ-7308 - Add standard product features is not working from Quick Admin page.
Thanks Ravi for the contribution. Thanks Montalbano for your help in discussion.

Modified:
    ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/product/ProductEvents.java

Modified: ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/product/ProductEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/product/ProductEvents.java?rev=1749813&r1=1749812&r2=1749813&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/product/ProductEvents.java (original)
+++ ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/product/ProductEvents.java Thu Jun 23 04:21:24 2016
@@ -881,9 +881,10 @@ public class ProductEvents {
         Delegator delegator = (Delegator) request.getAttribute("delegator");
         String productId = request.getParameter("productId");
         String productFeatureApplTypeId = request.getParameter("productFeatureApplTypeId");
-        String fromDate = request.getParameter("fromDate");
-        if ((fromDate == null) || (fromDate.trim().length() == 0)) {
-            fromDate = UtilDateTime.nowTimestamp().toString();
+        String fromDateStr = request.getParameter("fromDate");
+        Timestamp fromDate = UtilDateTime.nowTimestamp();
+        if (UtilValidate.isNotEmpty(fromDateStr)) {
+            fromDate = Timestamp.valueOf(fromDateStr);
         }
         String[] productFeatureIdArray = request.getParameterValues("productFeatureId");
         if (productFeatureIdArray != null && productFeatureIdArray.length > 0) {