Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-1507

Anonymous comment in a ticket causes error rendering ActivityModule in Issue Navigator

      Summary

      When enabling Service Desk for a normal project, there will be an error viewing the issue if that particular issue has a comment made by Anonymous users

      Steps to reproduce

      1. Create a normal project
      2. Give Group (Anyone) permission to browse project and comment on issue
      3. Create an issue in the project
      4. Have an anonymous user (not logged in) comment on that issue
      5. Enable Service Desk for the project
      6. View that particular issue in the Issue Navigator

      Expected Results

      1. Everything works normally
      2. Able to view the issue without any errors

      Actual Results

      1. When viewing the issue in the Issue Navigator, there will be the following error
      2. The following stacktrace is found in the logs:
        2015-02-27 08:48:25,556 http-bio-8080-exec-18 WARN admin 528x266768x1 5hjovl xxx.xxx.xxx.xxx,127.0.0.1 /browse/KEY1556 [com.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'java.lang.NullPointerException - null'.
        2015-02-27 08:48:25,557 http-bio-8080-exec-18 ERROR admin 528x266768x1 5hjovl /browse/KEY-1556 [jira.web.component.ModuleWebComponentImpl] An exception occured while rendering the web panel: com.atlassian.jira.jira-view-issue-plugin:activitymodule (null)
        com.atlassian.templaterenderer.RenderingException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getHtml' in  class com.atlassian.jira.issue.tabpanels.CommentAction threw exception java.lang.NullPointerException at viewissue/activityblock.vm[line 52, column 27]
        ...
        Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getHtml' in  class com.atlassian.jira.issue.tabpanels.CommentAction threw exception java.lang.NullPointerException at viewissue/activityblock.vm[line 52, column 27]
        	at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)
        	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
        	at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342)
        	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        	at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393)
        	at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316)
        	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
        	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
        	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
        	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
        	at org.apache.velocity.Template.merge(Template.java:328)
        	at org.apache.velocity.Template.merge(Template.java:235)
        	at com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererImpl.render(VelocityTemplateRendererImpl.java:100)
        	... 338 more
        Caused by: java.lang.NullPointerException
        	at com.atlassian.fugue.Option$3.apply(Option.java:400)
        	at com.atlassian.fugue.Option$3.apply(Option.java:398)
        	at com.google.common.collect.Iterators$7.computeNext(Iterators.java:649)
        	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
        	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
        	at com.google.common.collect.Iterators.getNext(Iterators.java:890)
        	at com.google.common.collect.Iterables.getFirst(Iterables.java:781)
        	at com.atlassian.jira.issue.fields.renderer.comment.DefaultCommentFieldRenderer.renderCommentFields(DefaultCommentFieldRenderer.java:106)
        	at com.atlassian.jira.issue.fields.renderer.comment.DefaultCommentFieldRenderer.getIssuePageViewHtml(DefaultCommentFieldRenderer.java:61)
        	at com.atlassian.jira.issue.tabpanels.CommentAction.getHtml(CommentAction.java:132)
        	at sun.reflect.GeneratedMethodAccessor1234.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:606)
        	at org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:142)
        	at org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:525)
        	at com.atlassian.velocity.htmlsafe.introspection.AnnotationBoxingPropertyGet.invoke(AnnotationBoxingPropertyGet.java:26)
        	at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:198)
        

      Notes

      Tested with JIRA 6.3.15 and Service Desk 2.2

        1. 1.png
          1.png
          77 kB

          Form Name

            [JSDSERVER-1507] Anonymous comment in a ticket causes error rendering ActivityModule in Issue Navigator

            Owen made changes -
            Workflow Original: JSD Bug Workflow v5 - TEMP [ 2304514 ] New: JAC Bug Workflow v3 [ 3126051 ]
            Status Original: Done [ 10044 ] New: Closed [ 6 ]
            Taiwo Akindele (Inactive) made changes -
            Link New: This issue has a regression in JSDSERVER-5966 [ JSDSERVER-5966 ]
            Taiwo Akindele (Inactive) made changes -
            Assignee Original: Taiwo Akindele [ takindele ]
            Taiwo Akindele (Inactive) made changes -
            Assignee Original: Chuong Nam Nguyen [ cnguyen ] New: Taiwo Akindele [ takindele ]

            This issue is there again with JSD 3.14.1 

            Baybars Kumbasar added a comment - This issue is there again with JSD 3.14.1 
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 [ 2058710 ] New: JSD Bug Workflow v5 - TEMP [ 2304514 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 - TEMP [ 2056043 ] New: JSD Bug Workflow v5 [ 2058710 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 [ 1955466 ] New: JSD Bug Workflow v5 - TEMP [ 2056043 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v4 [ 1615235 ] New: JSD Bug Workflow v5 [ 1955466 ]
            Confluence Escalation Bot (Inactive) made changes -
            Labels New: affects-server

              Unassigned Unassigned
              ywoo Yit Wei
              Affected customers:
              1 This affects my team
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: