Author: ashish
Date: Thu Jun 23 04:19:29 2016
New Revision: 1749811
URL:
http://svn.apache.org/viewvc?rev=1749811&view=revLog:
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/release14.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java
Modified: ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java?rev=1749811&r1=1749810&r2=1749811&view=diff==============================================================================
--- ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java (original)
+++ ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/product/ProductEvents.java Thu Jun 23 04:19:29 2016
@@ -876,9 +876,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) {