This is an automated email from the ASF dual-hosted git repository.

ashish 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 95880c5a0d Improved: 
https://localhost:8443/webtools/control/EntityExportAll Added the support of 
ThruDate on this screen. The user may want to export the data for limited 
number of days/months/years from this screen.
95880c5a0d is described below

commit 95880c5a0d95eb6ea3da732fb9d52d97b0f34151
Author: Ashish Vijaywargiya <[email protected]>
AuthorDate: Mon Feb 16 12:44:15 2026 +0530

    Improved:
    https://localhost:8443/webtools/control/EntityExportAll
    Added the support of ThruDate on this screen. The user may want to export 
the data for limited number of days/months/years from this screen.
    
    The current implementation restrict user to enter values only in the 
fromDate field. And all the records until today gets exported.
    Fixed: And also fixed a bug, this screen was failing to export the data and 
giving error in ServerHit entity, because there is no createdStamp field in 
this entity.
    
    2026-02-16 11:00:12,962 |sse-nio-8443-exec-24 |ServiceEventHandler          
 |E| Service invocation error
    org.apache.ofbiz.service.GenericServiceException: Service [entityExportAll] 
target threw an unexpected exception (FieldName createdStamp not found for 
entity: ServerHit)
            at 
org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:118)
 ~[main/:?]
            at 
org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
 ~[main/:?]
            at 
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:429) 
~[main/:?]
            at 
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:244) 
~[main/:?]
            at 
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:77)
 ~[main/:?]
            at 
org.apache.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:254)
 [main/:?]
            at 
org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:1086)
 [main/:?]
            at 
org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:672)
 [main/:?]
            at 
org.apache.ofbiz.webapp.control.ControlServlet.handle(ControlServlet.java:231) 
[main/:?]
            at 
org.apache.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:81) 
[main/:?]
            at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590) 
[tomcat-servlet-api-10.1.47.jar:6.0]
            at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) 
[tomcat-servlet-api-10.1.47.jar:6.0]
            at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.ofbiz.webapp.control.SameSiteFilter.doFilter(SameSiteFilter.java:45) 
[main/:?]
            at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:162)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:188) 
[main/:?]
            at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:162)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.ofbiz.base.util.CacheFilter.doFilter(CacheFilter.java:63) [main/:?]
            at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:162)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:272) 
[main/:?]
            at jakarta.servlet.http.HttpFilter.doFilter(HttpFilter.java:53) 
[tomcat-servlet-api-10.1.47.jar:6.0]
            at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:162)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:165)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:88)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:113) 
[tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:90) 
[tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:72)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:664)
 [tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) 
[tomcat-catalina-10.1.47.jar:10.1.47]
            at 
org.apache.coyote.http2.StreamProcessor.service(StreamProcessor.java:476) 
[tomcat-coyote-10.1.47.jar:10.1.47]
            at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
 [tomcat-coyote-10.1.47.jar:10.1.47]
            at 
org.apache.coyote.http2.StreamProcessor.process(StreamProcessor.java:102) 
[tomcat-coyote-10.1.47.jar:10.1.47]
            at 
org.apache.coyote.http2.StreamRunnable.run(StreamRunnable.java:35) 
[tomcat-coyote-10.1.47.jar:10.1.47]
            at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:975)
 [tomcat-util-10.1.47.jar:10.1.47]
            at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:493)
 [tomcat-util-10.1.47.jar:10.1.47]
            at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
 [tomcat-util-10.1.47.jar:10.1.47]
            at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
    Caused by: java.lang.IllegalArgumentException: FieldName createdStamp not 
found for entity: ServerHit
            at 
org.apache.ofbiz.entity.condition.EntityExpr.checkRhsType(EntityExpr.java:214) 
~[main/:?]
            at 
org.apache.ofbiz.entity.condition.EntityExpr.makeWhereString(EntityExpr.java:139)
 ~[main/:?]
            at 
org.apache.ofbiz.entity.condition.EntityJoinOperator.addSqlValue(EntityJoinOperator.java:84)
 ~[main/:?]
            at 
org.apache.ofbiz.entity.condition.EntityConditionListBase.makeWhereString(EntityConditionListBase.java:80)
 ~[main/:?]
            at 
org.apache.ofbiz.entity.condition.EntityConditionList.makeWhereString(EntityConditionList.java:32)
 ~[main/:?]
            at 
org.apache.ofbiz.entity.condition.EntityJoinOperator.addSqlValue(EntityJoinOperator.java:84)
 ~[main/:?]
            at 
org.apache.ofbiz.entity.condition.EntityConditionListBase.makeWhereString(EntityConditionListBase.java:80)
 ~[main/:?]
            at 
org.apache.ofbiz.entity.condition.EntityConditionList.makeWhereString(EntityConditionList.java:32)
 ~[main/:?]
            at 
org.apache.ofbiz.entity.datasource.GenericDAO.makeConditionWhereString(GenericDAO.java:956)
 ~[main/:?]
            at 
org.apache.ofbiz.entity.datasource.GenericDAO.selectListIteratorByCondition(GenericDAO.java:828)
 ~[main/:?]
            at 
org.apache.ofbiz.entity.datasource.GenericHelperDAO.findListIteratorByCondition(GenericHelperDAO.java:171)
 ~[main/:?]
            at 
org.apache.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1652) 
~[main/:?]
            at 
org.apache.ofbiz.entity.util.EntityQuery.queryIterator(EntityQuery.java:411) 
~[main/:?]
            at 
org.apache.ofbiz.webtools.WebToolsServices.entityExportAll(WebToolsServices.java:555)
 ~[main/:?]
            at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:?]
            at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[?:?]
            at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:?]
            at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
            at 
org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:101)
 ~[main/:?]
            ... 42 more
    2026-02-16 11:00:12,965 |sse-nio-8443-exec-24 |RequestHandler               
 |E| Request entityExportAll caused an error with the following message: Error 
calling event: org.apache.ofbiz.webapp.event.EventHandlerException: Service 
invocation error (FieldName createdStamp not found for entity: ServerHit)
    2026-02-16 11:00:12,966 |sse-nio-8443-exec-24 |RequestHandler               
 |I| Rendering View
---
 framework/webtools/servicedef/services.xml                     |  1 +
 .../main/java/org/apache/ofbiz/webtools/WebToolsServices.java  | 10 ++++++++--
 framework/webtools/template/entity/EntityExportAll.ftl         |  8 ++++++++
 framework/webtools/template/entity/XmlDsDump.ftl               |  3 ++-
 4 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/framework/webtools/servicedef/services.xml 
b/framework/webtools/servicedef/services.xml
index 105d4ddb5b..dcbb320b79 100644
--- a/framework/webtools/servicedef/services.xml
+++ b/framework/webtools/servicedef/services.xml
@@ -91,6 +91,7 @@ under the License.
         <permission-service service-name="entityMaintPermCheck" 
main-action="VIEW"/>
         <attribute name="outpath" type="String" mode="IN" optional="true"/>
         <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
+        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
         <attribute name="txTimeout" type="Integer" mode="IN" optional="true"/>
         <attribute name="results" type="List" mode="OUT" optional="false"/>
     </service>
diff --git 
a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java
 
b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java
index aa00b03bba..23b0f7d41a 100644
--- 
a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java
+++ 
b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java
@@ -505,6 +505,7 @@ public class WebToolsServices {
         Locale locale = (Locale) context.get("locale");
         String outpath = (String) context.get("outpath"); // mandatory
         Timestamp fromDate = (Timestamp) context.get("fromDate");
+        Timestamp thruDate = (Timestamp) context.get("thruDate");
         Integer txTimeout = (Integer) context.get("txTimeout");
         if (txTimeout == null) {
             txTimeout = 7200;
@@ -536,8 +537,13 @@ public class WebToolsServices {
                         continue;
                     }
                     List<EntityCondition> conds = new LinkedList<>();
-                    if (UtilValidate.isNotEmpty(fromDate)) {
-                        
conds.add(EntityCondition.makeCondition("createdStamp", 
EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
+                    if (!me.getNoAutoStamp()) {
+                        if (UtilValidate.isNotEmpty(fromDate)) {
+                            
conds.add(EntityCondition.makeCondition("createdStamp", 
EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
+                        }
+                        if (UtilValidate.isNotEmpty(thruDate)) {
+                            
conds.add(EntityCondition.makeCondition("createdStamp", 
EntityOperator.LESS_THAN_EQUAL_TO, thruDate));
+                        }
                     }
                     EntityQuery eq = 
EntityQuery.use(delegator).from(curEntityName).where(conds).orderBy(me.getPkFieldNames());
 
diff --git a/framework/webtools/template/entity/EntityExportAll.ftl 
b/framework/webtools/template/entity/EntityExportAll.ftl
index 9c3ebb983a..7ad1fd078f 100644
--- a/framework/webtools/template/entity/EntityExportAll.ftl
+++ b/framework/webtools/template/entity/EntityExportAll.ftl
@@ -46,6 +46,14 @@ under the License.
                     <@htmlTemplate.renderDateTimeField name="fromDate" 
event="" action="" className="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" 
value="" size="25" maxlength="30" id="fromDate" isDateType=true 
shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" 
localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" 
hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" 
amSelected="" pmSelected="" compositeType="" formName=""/>
                 </td>
             </tr>
+            <tr>
+                <td class="label">
+                    <label>${uiLabelMap.CommonThruDate}</label>
+                </td>
+                <td>
+                    <@htmlTemplate.renderDateTimeField name="thruDate" 
event="" action="" className="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" 
value="" size="25" maxlength="30" id="thruDate" isDateType=true 
shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" 
localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" 
hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" 
amSelected="" pmSelected="" compositeType="" formName=""/>
+                </td>
+            </tr>
             <tr>
                 <td class="label">
                     ${uiLabelMap.WebtoolsTimeoutSeconds}: 
diff --git a/framework/webtools/template/entity/XmlDsDump.ftl 
b/framework/webtools/template/entity/XmlDsDump.ftl
index 53e3b70f2a..ed696f7687 100644
--- a/framework/webtools/template/entity/XmlDsDump.ftl
+++ b/framework/webtools/template/entity/XmlDsDump.ftl
@@ -126,7 +126,8 @@ under the License.
                 <#assign check = "false"/>
             </#if>
             <#assign curEntityName = modelEntity.getEntityName()/>
-            <td><input type="checkbox" name="entityName" 
value="${curEntityName}"<#if check="true"> 
checked="checked"</#if>/>${curEntityName}</td>
+            <#assign isViewEntity = (modelEntity.getClass().getName() == 
"org.apache.ofbiz.entity.model.ModelViewEntity")/>
+            <td><input type="checkbox" name="entityName" 
value="${curEntityName}"<#if check="true"> 
checked="checked"</#if>/>${curEntityName}<#if isViewEntity> (View 
Entity)</#if></td>
           </#list>
         </tr>
       </table>

Reply via email to