metasfresh / metasfresh-webui-frontend-legacy

metasfresh Webui Frontend
GNU General Public License v2.0
57 stars 35 forks source link

Filter label when parameter is set to N #1962

Open metas-dh opened 6 years ago

metas-dh commented 6 years ago

Is this a bug or feature request?

FR

What is the current behavior?

Atm a filter label does not show when a parameter is set to N: e.g. set Customer=Y in bpartner window, and then set it to N (=> checkbox is not filled anymore, only framed): Filter label is empty:

2018-09-12 11_04_17-notificationsform

Which are the steps to reproduce?

Check and see.

What is the expected or desired behavior?

Filter label shall be set accordingly when parameter is set to N (maybe check with metas-mk how exactly it should look like).

siemiatj commented 6 years ago

I assumed if something is set to N, it's not set at all. It's only different for defaultValue, when it's set to true by default and we set it to false explicitly.

metas-dh commented 6 years ago

If a filter parameter is set to false explicitly, then the checkbox is supposed to look like this:

2018-09-27 10_21_58-metasfresh

In this case, the filter is for not yet processed documents, as it is set in the user query for open invoices, used in printing queue:

2018-09-27 10_27_08-metasfresh

But, when you have the user query with Display All Parameters & Mandatory Parameters set to Y , and you open the filter, then the parameter for processed is not set to N initially:

2018-09-27 10_26_10-metasfresh

So, when you just apply the filter as it is shown above, you get this error:

``` {timestamp: 1538036808691, status: 500, error: "Internal Server Error",…} error: "Internal Server Error" exception: "java.lang.IllegalArgumentException" message: "Parameter 'IsForeignCustomer' was not provided" path: "/rest/api/documentView/540165/540165-Bf/filter" status: 500 timestamp: 1538036808691 trace: ["java.lang.IllegalArgumentException: Parameter 'IsForeignCustomer' was not provided",…] [0 … 99] 0: "java.lang.IllegalArgumentException: Parameter 'IsForeignCustomer' was not provided" 1: " at de.metas.ui.web.document.filter.json.JSONDocumentFilter.unwrapUsingDescriptor(JSONDocumentFilter.java:112)" 2: " at de.metas.ui.web.document.filter.json.JSONDocumentFilter.unwrap(JSONDocumentFilter.java:75)" 3: " at de.metas.ui.web.document.filter.json.JSONDocumentFilter.lambda$unwrapList$0(JSONDocumentFilter.java:57)" 4: " at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)" 5: " at java.util.Collections$2.tryAdvance(Collections.java:4717)" 6: " at java.util.Collections$2.forEachRemaining(Collections.java:4725)" 7: " at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)" 8: " at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)" 9: " at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)" 10: " at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)" 11: " at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)" 12: " at de.metas.ui.web.document.filter.json.JSONDocumentFilter.unwrapList(JSONDocumentFilter.java:59)" 13: " at de.metas.ui.web.view.DefaultView$Builder.setFiltersFromJSON(DefaultView.java:803)" 14: " at de.metas.ui.web.view.SqlViewFactory.createView(SqlViewFactory.java:301)" 15: " at de.metas.ui.web.view.IViewFactory.filterView(IViewFactory.java:55)" 16: " at de.metas.ui.web.view.ViewsRepository.filterView(ViewsRepository.java:287)" 17: " at sun.reflect.GeneratedMethodAccessor410.invoke(Unknown Source)" 18: " at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)" 19: " at java.lang.reflect.Method.invoke(Method.java:498)" 20: " at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)" 21: " at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)" 22: " at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)" 23: " at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)" 24: " at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)" 25: " at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)" 26: " at com.sun.proxy.$Proxy118.filterView(Unknown Source)" 27: " at de.metas.ui.web.view.ViewRestController.filterView(ViewRestController.java:183)" 28: " at sun.reflect.GeneratedMethodAccessor409.invoke(Unknown Source)" 29: " at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)" 30: " at java.lang.reflect.Method.invoke(Method.java:498)" 31: " at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)" 32: " at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)" 33: " at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)" 34: " at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)" 35: " at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)" 36: " at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)" 37: " at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)" 38: " at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)" 39: " at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)" 40: " at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)" 41: " at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)" 42: " at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)" 43: " at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)" 44: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)" 45: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 46: " at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)" 47: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 48: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 49: " at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)" 50: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 51: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 52: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 53: " at de.metas.ui.web.config.WebConfig$1.doFilter(WebConfig.java:82)" 54: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 55: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 56: " at de.metas.ui.web.config.ServletLoggingFilter.doFilter(ServletLoggingFilter.java:89)" 57: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 58: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 59: " at de.metas.ui.web.config.CORSFilter.doFilter(CORSFilter.java:79)" 60: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 61: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 62: " at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110)" 63: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 64: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 65: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 66: " at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)" 67: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 68: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 69: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 70: " at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)" 71: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 72: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 73: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 74: " at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)" 75: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 76: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 77: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 78: " at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167)" 79: " at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)" 80: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 81: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 82: " at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)" 83: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 84: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 85: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 86: " at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)" 87: " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)" 88: " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)" 89: " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)" 90: " at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)" 91: " at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)" 92: " at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)" 93: " at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)" 94: " at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)" 95: " at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)" 96: " at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)" 97: " at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)" 98: " at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)" 99: " at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)" [100 … 106] 100: " at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)" 101: " at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)" 102: " at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)" 103: " at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)" 104: " at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)" 105: " at java.lang.Thread.run(Thread.java:748)" 106: "" ```