[LRA-226] Create the suggestion box app Created: 15/Feb/16  Updated: 07/Apr/16

Status: Open
Project: Liferay Apps
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: mcalvo Assignee: Manrique Varela [X] (Inactive)
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: It should work for liferay-portal-6.2.10.1-ee-ga1 and liferay-portal-6.2-ee-sp14
and liferay-portal-6.2.0-ce-ga1 and liferay-portal-6.2-ce-ga6


 Description   
The app should allow any portal user to submit suggestions. It should capture:
+ User name (non visible)
+ Date (non visible)
+ Suggestion category (using Liferay categories)
+ Suggestion title
+ Suggestion description

the suggestion will be stored and the admin user will see a list of suggestion with this columns (should be able to sort by any column, by default it should be ordered by 'date' new first and status 'created'):
+ Submission Date
+ Category
+ Title
+ Status (created or received)

Once the admin clicks on one of the suggestion she/he will see all the fields including now description and user. If the suggestion is not 'received' yet she/he can enter a comment and receive it. If the suggestion is received then all fields will be readonly (including the date when it was received).

The regular user can see a list of all the suggestions she/he has sent (should be able to sort by any column, by default it should be ordered by 'date' new first and status 'created'):
+ Submission Date
+ Category
+ Title
+ Status (created or received)

Once the user clicks on one of the suggestion she/he will see all the fields and should be able to edit them or removed the suggestion if it is not received yet.


 Comments   
Comment by mcalvo [ 15/Feb/16 ]
As a reference you can see how something similar was implemented in this app:
http://wiki.rivetlogic.com/display/LRA/Micro-site+Manager
Comment by mcalvo [ 24/Feb/16 ]
Luis, the documentation for this app is here:
http://wiki.rivetlogic.com/display/LRA/Suggestion+Box

please ask Manrique for the link from where you can download the code.
Comment by Manrique Varela [X] (Inactive) [ 24/Feb/16 ]
Luis, use this repo on my personal GitHub account https://github.com/manriquevarela/liferay-suggestion-box
Comment by Luis Hernandez [X] (Inactive) [ 26/Feb/16 ]
1 - [Bug] User can not edit a suggestion

PRIORITY:
====================
Critical

ENVIRONMENT:
====================
LR Version: liferay-portal-6.2-ee-sp14

REPRODUCIBILITY LEVEL:
====================
Always

STEPS:
====================
1. Go to any page with the suggestions box portlet (configured previously)
2. Create a new suggestion as the next:
-Category: Any
-Title: Test update
-Description: Update this

Click on “Save”

3. Click on the options dropdown list, and click on “Edit”
4. Update any field, e.g: Description
5. Click on “Save”

CURRENT RESULT:
====================
Step 5: Two error message are displayed and the suggestion is not updated
Errors:
-”Your request failed to complete.”
-”You do not have permission to perform that operation.”

Watch the next video:
http://screencast.com/t/eLBvd9LqNihn

EXPECTED RESULT:
====================
If the user was created the suggestion, that user should be able to update the suggestion.

--Verified as fixed on 01-03-2016, resolution for this: Fixed--
Comment by mcalvo [ 07/Apr/16 ]
I created a new suggestion, the admin users gets the notification. Then before the admin user clicks the notification link the suggestion was removed, and the admin user gets non self explanatory error and the console shows this:

Apr 06, 2016 11:08:04 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /devm/liferay-portal-6.2-ee-sp14/tomcat-7.0.62/webapps/suggestion-box-portlet has finished in 2,406 ms
17:21:07,184 ERROR [http-bio-8080-exec-7][AutoLoginFilter:262] Current URL / generates exception: com.liferay.portal.kernel.exception.SystemException: com.liferay.util.EncryptorException: com.liferay.util.EncryptorException: javax.crypto.BadPaddingException: Given final block not properly padded
17:23:27,172 WARN [liferay/mail-1][MailEngine:600] Failed to connect to a valid mail server. Please make sure one is properly configured. Could not connect to SMTP host: localhost, port: 25
17:24:42,500 ERROR [http-bio-8080-exec-4][AutoLoginFilter:262] Current URL /web/guest/test-suggestions generates exception: com.liferay.portal.kernel.exception.SystemException: com.liferay.util.EncryptorException: com.liferay.util.EncryptorException: javax.crypto.BadPaddingException: Given final block not properly padded
19:39:23,728 WARN [http-bio-8080-exec-1][SuggestionPersistenceImpl:3171] No Suggestion exists with the primary key 3
Apr 07, 2016 7:39:23 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
com.rivetlogic.suggestionbox.NoSuchSuggestionException: No Suggestion exists with the primary key 3
at com.rivetlogic.suggestionbox.service.persistence.SuggestionPersistenceImpl.findByPrimaryKey(SuggestionPersistenceImpl.java:3174)
at com.rivetlogic.suggestionbox.service.persistence.SuggestionPersistenceImpl.findByPrimaryKey(SuggestionPersistenceImpl.java:3192)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:320)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at com.liferay.portal.dao.shard.advice.ShardPersistenceAdvice.invoke(ShardPersistenceAdvice.java:54)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy570.findByPrimaryKey(Unknown Source)
at com.rivetlogic.suggestionbox.service.base.SuggestionLocalServiceBaseImpl.getSuggestion(SuggestionLocalServiceBaseImpl.java:231)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at com.sun.proxy.$Proxy569.getSuggestion(Unknown Source)
at com.rivetlogic.suggestionbox.service.SuggestionLocalServiceUtil.getSuggestion(SuggestionLocalServiceUtil.java:202)
at org.apache.jsp.html.suggestionbox.edit_005fadmin_005fsuggestion_jsp._jspService(edit_005fadmin_005fsuggestion_jsp.java:287)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:331)
at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:112)
at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:362)
at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:378)
at com.liferay.util.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:311)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:262)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:55)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:112)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:583)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:656)
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:362)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1239)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
Generated at Sat Feb 10 05:49:31 GMT 2024 using Jira 8.1.3#801003-sha1:6b6f07cffadda9a0d6efe24639daed8ce94dcdd6.