Project

General

Profile

Actions

task #1606

closed

Restrict filtered selection of in references to the respective reference types

Added by Niels Hoffmann over 13 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
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

Has duplicate EDIT - feature request #3534: Predefine inreference type when adding the inreference to a subreferenceDuplicateKatja Luther

Actions
Actions #1

Updated by Niels Hoffmann over 13 years ago

  • Category deleted (taxeditor)
Actions #2

Updated by Niels Hoffmann over 13 years ago

  • Category set to taxeditor
Actions #3

Updated by Niels Hoffmann over 13 years ago

  • Priority changed from Priority13 to Highest
Actions #4

Updated by Niels Hoffmann over 13 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
Actions #5

Updated by Niels Hoffmann over 13 years ago

  • Assignee changed from Niels Hoffmann to em.lee -
Actions #6

Updated by Andreas Müller about 13 years ago

  • Assignee changed from em.lee - to Niels Hoffmann
Actions #7

Updated by Andreas Müller about 13 years ago

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

Actions #8

Updated by Niels Hoffmann almost 13 years ago

also see also see #1607

Actions #9

Updated by Andreas Müller about 7 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.

Actions #10

Updated by Andreas Müller almost 7 years ago

  • Target version changed from Unassigned CDM tickets to Release 4.5
  • Estimated time set to 3:00 h
Actions #11

Updated by Andreas Müller over 6 years ago

  • Target version changed from Release 4.5 to Release 4.6
Actions #12

Updated by Katja Luther over 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50
Actions #13

Updated by Katja Luther over 6 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

Actions #14

Updated by Katja Luther over 6 years ago

  • Assignee changed from Katja Luther to Andreas Müller
Actions #15

Updated by Andreas Müller over 6 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

Actions #16

Updated by Andreas Müller over 6 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)
    ...
Actions #17

Updated by Andreas Müller over 6 years ago

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

Updated by Katja Luther over 6 years ago

  • Status changed from Feedback to Resolved

please review

Actions #19

Updated by Andreas Müller over 6 years ago

  • Assignee changed from Katja Luther to Andreas Müller
Actions #20

Updated by Andreas Müller over 6 years ago

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

Seems to work now

Actions #21

Updated by Andreas Müller over 6 years ago

  • % Done changed from 50 to 100
  • Private changed from Yes to No
Actions #22

Updated by Andreas Müller over 5 years ago

  • Has duplicate feature request #3534: Predefine inreference type when adding the inreference to a subreference added
Actions

Also available in: Atom PDF