Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-66038

Unable to copy dashboard if it contains a connect add-on gadget with a Title

    XMLWordPrintable

Details

    Description

      Summary

      Getting 500 error code when users try to copy a dashboard that contains a connect add-on gadget such as Test Execution Gadget
      or Timesheets with a "Title" set.

      Steps to reproduce when using Test Execution Gadget:

      1. Create a few issues with Test issue types
      2. Create a new cycle and add the above issues: Test -> Plan Test Cycle -> Create New Cycle -> Cog Icon -> Add Test -> Select issues with Test issue types -> Add
      3. Add Test Execution Details gadget to a dashboard (make sure the above issues are shown)
      4. Copy that dashboard

      Steps to reproduce when adding a Timesheets gadget

      1. Add the gadget to the dashboard
      2. Edit and add a Title
      3. Copy that dashboard

      Actual Results

      500 error code shown and the page is not redirected to the copied dashboard

      Expected Results

      The page is redirected to the copied dashboard without any error

      Error

      2015-10-12 05:26:11.885848500 2015-10-12 05:26:11,879 ajp-nio-127.0.0.104-8009-exec-43 ERROR      [o.a.c.c.C.[.[localhost].[/].[action]] Servlet.service() for servlet [action] in context with path [] threw exception [com.atlassian.jira.entity.property.InvalidJsonPropertyException: Unrecognized token 'title': was expecting 
      2015-10-12 05:26:11.885850500      at [Source: java.io.StringReader@1d5061c; line: 1, column: 8]] with root cause
      2015-10-12 05:26:11.885851500 org.codehaus.jackson.JsonParseException: Unrecognized token 'title': was expecting 
      2015-10-12 05:26:11.885865500  at [Source: java.io.StringReader@1d5061c; line: 1, column: 8]
      2015-10-12 05:26:11.885866500 	at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1432)
      2015-10-12 05:26:11.885866500 	at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:385)
      2015-10-12 05:26:11.885867500 	at org.codehaus.jackson.impl.ReaderBasedParser._reportInvalidToken(ReaderBasedParser.java:1805)
      2015-10-12 05:26:11.885869500 	at org.codehaus.jackson.impl.ReaderBasedParser._matchToken(ReaderBasedParser.java:1638)
      2015-10-12 05:26:11.885869500 	at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:449)
      2015-10-12 05:26:11.885870500 	at com.atlassian.jira.entity.property.JsonEntityPropertyManagerImpl.validateJson(JsonEntityPropertyManagerImpl.java:404)
      2015-10-12 05:26:11.885874500 	at com.atlassian.jira.entity.property.JsonEntityPropertyManagerImpl.putDryRun(JsonEntityPropertyManagerImpl.java:89)
      2015-10-12 05:26:11.885874500 	at com.atlassian.jira.entity.property.JsonEntityPropertyManagerImpl.put(JsonEntityPropertyManagerImpl.java:102)
      2015-10-12 05:26:11.885875500 	at com.atlassian.jira.portal.OfbizPortletConfigurationStore.updateLocalDashboardItemProperties(OfbizPortletConfigurationStore.java:287)
      2015-10-12 05:26:11.885877500 	at com.atlassian.jira.portal.OfbizPortletConfigurationStore.updateUserPrefs(OfbizPortletConfigurationStore.java:274)
      2015-10-12 05:26:11.885877500 	at com.atlassian.jira.portal.OfbizPortletConfigurationStore.addDashboardItem(OfbizPortletConfigurationStore.java:220)
      2015-10-12 05:26:11.885878500 	at com.atlassian.jira.portal.CachingPortletConfigurationStore.addDashboardItem(CachingPortletConfigurationStore.java:228)
      2015-10-12 05:26:11.885880500 	at com.atlassian.jira.portal.PortletConfigurationManagerImpl.addDashBoardItem(PortletConfigurationManagerImpl.java:48)
      2015-10-12 05:26:11.885880500 	at com.atlassian.jira.portal.DefaultPortalPageManager.clonePortletsFromOnePageToAnother(DefaultPortalPageManager.java:355)
      2015-10-12 05:26:11.885883500 	at com.atlassian.jira.portal.DefaultPortalPageManager.createBasedOnClone(DefaultPortalPageManager.java:236)
      2015-10-12 05:26:11.885884500 	at com.atlassian.jira.bc.portal.DefaultPortalPageService.createPortalPageByClone(DefaultPortalPageService.java:289)
      2015-10-12 05:26:11.885884500 	at com.atlassian.jira.web.action.user.AddPortalPage.clonePortalPage(AddPortalPage.java:344)
      2015-10-12 05:26:11.885886500 	at com.atlassian.jira.web.action.user.AddPortalPage.doExecute(AddPortalPage.java:146)
      2015-10-12 05:26:11.885887500 	... 1 filtered
      2015-10-12 05:26:11.885887500 	at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:67)
      2015-10-12 05:26:11.885887500 	... 7 filtered
      2015-10-12 05:26:11.885888500 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
      2015-10-12 05:26:11.885889500 	... 47 filtered
      2015-10-12 05:26:11.885889500 	at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59)
      2015-10-12 05:26:11.885890500 	... 28 filtered
      2015-10-12 05:26:11.885890500 	at com.atlassian.jira.plugins.rest.HOT25715FixServletFilter.doFilter(HOT25715FixServletFilter.java:46)
      2015-10-12 05:26:11.885891500 	... 150 filtered
      2015-10-12 05:26:11.885891500 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2015-10-12 05:26:11.885893500 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2015-10-12 05:26:11.885896500 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      2015-10-12 05:26:11.885896500 	at java.lang.Thread.run(Thread.java:745)
      

      Cause:

      The gadget has a Title set and the json stored in the database in is not expected to have a "title" when being copied

      Workaround

      • Remove title from the Gadget
        or
      • Remove Gadget from Dashboard

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rsaputra Adven
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: