core-geonetwork icon indicating copy to clipboard operation
core-geonetwork copied to clipboard

Draft / More work required

Open fxprunayre opened this issue 5 years ago • 5 comments

Related to the draft work (#3592), some more work required on the following items:

Bugs

  • [x] Create record, Publish, Enable workflow = Record is unpublished. Should not.

  • [x] Add rating return NPE (not sure if related to draft changes ?).

Improvements

  • [x] UI / Some tags are rotated some not. @MichelGabriel could you have a look once merged ?

image

  • [ ] Check if StatusActions is still relevant?

  • [ ] Review https://docs.google.com/spreadsheets/d/1TTocIhI94X5OoEURBVhQsqRnRjzGnPWW-WoMy5Yxr3Y/edit?ts=5d09d7f3#gid=0

  • [ ] Documentation need a rework to explain how it works clearly

  • [ ] The draft PR was removing the accessManager.isOwner in https://github.com/geonetwork/core-geonetwork/blob/master/services/src/main/java/org/fao/geonet/api/records/MetadataWorkflowApi.java#L310-L316 Restoring it but a double check would be needed.

fxprunayre avatar Jun 18 '19 14:06 fxprunayre

@fxprunayre Please give me the 'go' sign when everything is merged.

MichelGabriel avatar Jun 19 '19 07:06 MichelGabriel

@fxprunayre Please give me the 'go' sign when everything is merged.

Go ;)

fxprunayre avatar Jun 19 '19 07:06 fxprunayre

@PascalLike do you have time to check the NPE on rating change ?


2019-08-22 11:34:06,343 ERROR [geonetwork.api] - UserFeedbackAPI - newUserFeedback: null
java.lang.NullPointerException
	at org.fao.geonet.repository.MetadataRatingByIpRepositoryImpl.averageRating(MetadataRatingByIpRepositoryImpl.java:61)
	at org.fao.geonet.repository.MetadataRatingByIpRepositoryImpl$$FastClassBySpringCGLIB$$ef81c63a.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:651)
	at org.fao.geonet.repository.MetadataRatingByIpRepositoryImpl$$EnhancerBySpringCGLIB$$458d5789.averageRating(<generated>)
	at sun.reflect.GeneratedMethodAccessor712.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344)
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:319)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	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.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.data.jpa.repository.support.LockModeRepositoryPostProcessor$LockModePopulatingMethodIntercceptor.invoke(LockModeRepositoryPostProcessor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
	at com.sun.proxy.$Proxy168.averageRating(Unknown Source)
	at org.fao.geonet.kernel.datamanager.draft.DraftMetadataUtils.rateMetadata(DraftMetadataUtils.java:201)

It looks like the average value is not properly computed when it is the first comment added ?

fxprunayre avatar Aug 22 '19 09:08 fxprunayre

Hi Francois, please check this https://github.com/geonetwork/core-geonetwork/pull/3972

PascalLike avatar Aug 22 '19 10:08 PascalLike

It would be good that the workflow & draft work get some attention in 3.8/10.x as quite some issues are open related to that and the doc is clearly outdated now https://geonetwork-opensource.org/manuals/3.8.x/en/user-guide/workflow/life-cycle.html

fxprunayre avatar Dec 06 '19 09:12 fxprunayre