Project

General

Profile

task #1606

Restrict filtered selection of in references to the respective reference types

Added by Niels Hoffmann over 8 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
04/15/2010
Due date:
% Done:

100%

Estimated time:
3.00 h
Severity:
normal

Description

Article -> Journal as inReference ONLY!

BookSection -> Book as inReference ONLY!

Print Series for Books and Proceedings ONLY!


Related issues

Duplicated by Edit - feature request #3534: Predefine inreference type when adding the inreference to a subreference Duplicate

Associated revisions

Revision 71bfbee0 (diff)
Added by Katja Luther almost 2 years ago

ref #1606: add methods to provide filter for reference type

Revision 16b736f1 (diff)
Added by Katja Luther almost 2 years ago

ref #1606: for inReferences use service methods filtering for the right referencetype

Revision a80bb20e (diff)
Added by Katja Luther almost 2 years ago

fix #1606: add generic type to all filters

Revision f4a1c455 (diff)
Added by Andreas Müller almost 2 years ago

ref #1606 fix bug in referenceDao.getUuidAndTitleCache

Revision fd482224 (diff)
Added by Katja Luther almost 2 years ago

ref #1606: fix exception for pattern ? in reference selection dialog

History

#1 Updated by Niels Hoffmann over 8 years ago

  • Category deleted (taxeditor)

#2 Updated by Niels Hoffmann over 8 years ago

  • Category set to taxeditor

#3 Updated by Niels Hoffmann over 8 years ago

  • Priority changed from Priority13 to Highest

#4 Updated by Niels Hoffmann over 8 years ago

  • Subject changed from Restrict filtered selection of in references for the respective reference types to Restrict filtered selection of in references to the respective reference types

#5 Updated by Niels Hoffmann over 8 years ago

  • Assignee changed from Niels Hoffmann to em.lee -

#6 Updated by Andreas Müller over 8 years ago

  • Assignee changed from em.lee - to Niels Hoffmann

#7 Updated by Andreas Müller over 8 years ago

Generic also needs Generic In Reference. IGeneric will be soon changed this way

#8 Updated by Niels Hoffmann about 8 years ago

also see also see #1607

#9 Updated by Andreas Müller over 2 years ago

  • Description updated (diff)
  • Assignee changed from Niels Hoffmann to Katja Luther
  • Target version changed from TaxEditor Next Major Release to Unassigned CDM tickets

This might still be an interesting open issue. Discuss with users.

#10 Updated by Andreas Müller about 2 years ago

  • Target version changed from Unassigned CDM tickets to Release 4.5
  • Estimated time set to 3.00 h

#11 Updated by Andreas Müller almost 2 years ago

  • Target version changed from Release 4.5 to Release 4.6

#12 Updated by Katja Luther almost 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#13 Updated by Katja Luther almost 2 years ago

implemented for:

Article -> journal
InProceedings -> proceedings
Booksection -> book
book -> printSeries
proceedings -> printSeries
generic -> generic

please have a look if every works as expected

#14 Updated by Katja Luther almost 2 years ago

  • Assignee changed from Katja Luther to Andreas Müller

#15 Updated by Andreas Müller almost 2 years ago

Katja Luther wrote:

Applied in changeset cdmlib|a80bb20e9da22230326d65598b4cf07ff1a5dff5.

There was a logic mistake in

queryString += "r.type = :type OR r.type = :genericType" ... AND ;

correct is: queryString += "(r.type = :type OR r.type = :genericType)" ... AND ;

Test failed but was not recognized because of failing upgrade to Java1.8 at same time.

Fixed with f4a1c455e50835936c770060a15fcfc5be900cbe

#16 Updated by Andreas Müller almost 2 years ago

When trying to select a reference for an article with "?" I got the following exception:

login : admin
editor version : 4.6.0.201702161652
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 4.1.0.0.201607300000
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: null near line 1, column 145 [SELECT r.uuid, r.id, r.titleCache, ab.titleCache FROM eu.etaxonomy.cdm.model.reference.Reference AS r LEFT OUTER JOIN r.authorship AS ab  WHERE ]
    at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:74)
    at org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(ErrorCounter.java:91)
    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:288)
    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:187)
    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142)
    at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115)
    at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:76)
    at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:150)
    at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:302)
    at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:240)
    at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1894)
    at eu.etaxonomy.cdm.persistence.dao.hibernate.reference.ReferenceDaoHibernateImpl.getUuidAndTitleCache(ReferenceDaoHibernateImpl.java:116)
    at eu.etaxonomy.cdm.api.service.ReferenceServiceImpl.getUuidAndTitleCache(ReferenceServiceImpl.java:134)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
    at com.sun.proxy.$Proxy733.getUuidAndTitleCache(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:78)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
    at com.sun.proxy.$Proxy1033.getUuidAndTitleCache(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:212)
    at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:39)
    at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78)
    at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:114)
    at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:74)
    at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:871)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:213)
    ...

#17 Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

#18 Updated by Katja Luther almost 2 years ago

  • Status changed from Feedback to Resolved

please review

#19 Updated by Andreas Müller almost 2 years ago

  • Assignee changed from Katja Luther to Andreas Müller

#20 Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Müller to Katja Luther

Seems to work now

#21 Updated by Andreas Müller almost 2 years ago

  • % Done changed from 50 to 100
  • Private changed from Yes to No

#22 Updated by Andreas Müller 6 months ago

  • Duplicated by feature request #3534: Predefine inreference type when adding the inreference to a subreference added

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)