svn commit: r1749810 - /ofbiz/branches/release15.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1749810 - /ofbiz/branches/release15.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java

ashish-18
Author: ashish
Date: Thu Jun 23 04:17:02 2016
New Revision: 1749810

URL: http://svn.apache.org/viewvc?rev=1749810&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/release15.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java

Modified: ofbiz/branches/release15.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java?rev=1749810&r1=1749809&r2=1749810&view=diff
==============================================================================
--- ofbiz/branches/release15.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java (original)
+++ ofbiz/branches/release15.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java Thu Jun 23 04:17:02 2016
@@ -875,9 +875,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) {