svn commit: r1858305 - in /ofbiz/ofbiz-framework/trunk/applications: datamodel/entitydef/product-entitymodel.xml product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWrapper.java

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

svn commit: r1858305 - in /ofbiz/ofbiz-framework/trunk/applications: datamodel/entitydef/product-entitymodel.xml product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWrapper.java

Arun Patidar-4
Author: arunpatidar
Date: Sun Apr 28 06:15:46 2019
New Revision: 1858305

URL: http://svn.apache.org/viewvc?rev=1858305&view=rev
Log:
Improved: Having ability to make Configurable options date controlled
(OFBiz-10950)

Thanks: Pritam Kute for reporting and Mohammed Rehan Khan for providing patch.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/product-entitymodel.xml
    ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWrapper.java

Modified: ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/product-entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/product-entitymodel.xml?rev=1858305&r1=1858304&r2=1858305&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/product-entitymodel.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/product-entitymodel.xml Sun Apr 28 06:15:46 2019
@@ -657,6 +657,8 @@ under the License.
             title="Product Configuration Options">
         <field name="configItemId" type="id"></field>
         <field name="configOptionId" type="id"></field>
+        <field name="fromDate" type="date-time"></field>
+        <field name="thruDate" type="date-time"></field>
         <field name="configOptionName" type="name"></field>
         <field name="description" type="description"></field>
         <field name="sequenceNum" type="numeric"></field>

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWrapper.java?rev=1858305&r1=1858304&r2=1858305&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWrapper.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWrapper.java Sun Apr 28 06:15:46 2019
@@ -140,7 +140,7 @@ public class ProductConfigWrapper implem
                     itemIds.add(oneQuestion.getConfigItem().getString("configItemId"));
                 }
                 questions.add(oneQuestion);
-                List<GenericValue> configOptions = EntityQuery.use(delegator).from("ProductConfigOption").where("configItemId", oneQuestion.getConfigItemAssoc().getString("configItemId")).orderBy("sequenceNum").queryList();
+                List<GenericValue> configOptions = EntityQuery.use(delegator).from("ProductConfigOption").where("configItemId", oneQuestion.getConfigItemAssoc().getString("configItemId")).orderBy("sequenceNum").filterByDate().queryList();
                 for (GenericValue configOption: configOptions) {
                     ConfigOption option = new ConfigOption(delegator, dispatcher, configOption, oneQuestion, catalogId, webSiteId, currencyUomId, autoUserLogin);
                     oneQuestion.addOption(option);