Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-60605

Jira Issues Macro may not load for some users if the Team custom field from Advanced Roadmaps is chosen as a column to display

      Problem

      Advanced Roadmaps for Jira has a Shared Teams feature.
      This feature comes with a Custom Field named Team that is used to associate private and shared teams to an issue.
      When a plan has a shared team associated with it, a Jira Issues Macro with the Team custom field will fail to render issues with the message below if the user loading the page doesn't have the Advanced Roadmaps shared team management permission in Jira.

      Data cannot be retrieved due to an unexpected error.
      View these issues in Jira
      


      Listing the same issues in Jira, with the same display columns, won't fail for the affected user.

      Environment

      Reproduced locally with:

      • Jira Portfolio issue addon version 3.18.0 and latest version 3.29.2
      • Confluence version 7.4.3
      • Jira Project Management Software 7.13.11
      • Jira used for user management for the Confluence site

      Steps to Reproduce

      (Recording attached)

      On the Jira and Jira Portfolio side

      • Create a new group jira-users on the jira side and configure Jira Portfolio permissions as per the screenshot attached
      • Create a new non admin user testuser part of the jira-users group
      • Create a new plan, a new shared team in Jira Portfolio associated with a Test project and board.
      • Add the Team field to be part of the default screens for display and new issue creation for the Test project
      • Create a few issues in the Test project and associate them with the Share Team from Portfolio
      • Confirm you can see the Team against the issues whilst log in with testuser

      On the Confluence side

      • Create a new Page that contains 2 Jira Issues Macro:
        • one that displays default information from JQL: Project = Test
        • The second one that displays the Team column in addition to the default one but still querying the Test project: Project = Test

      Expected Results

      testuser should be able to see the Jira issues from Confluence JIM as it is able to see the Jira issues directly in Jira.

      Actual Results

      testuser cannot see Jira Issue Macro in Confluence when it contains Team information. It will however be able to see the first Jira Issue Macro fine.

      Checking the Confluence application log you may see entries similar to the below:

      2021-03-16 16:12:31,670 ERROR [JIM Marshaller:thread-3] [confluence.extra.jira.JiraIssuesMacro] executeRest ResponseExceptionException
       -- url: /c7111/pages/viewpage.action | page: 1474562 | traceId: 6aa2959d20740f60 | userName: user002 | referer: http://localhost:27111/c7111/login.action?os_destination=%2Fpages%2Fviewpage.action%3FspaceKey%3DSO%26title%3DNew%2Bpage%2Bjira%2Bissues&permissionViolation=true | action: viewpage
      com.atlassian.sal.api.net.ResponseStatusException: Unexpected response received. Status code: 403
      	at com.atlassian.applinks.core.auth.ApplicationLinksStringReturningResponseHandler.handle(ApplicationLinksStringReturningResponseHandler.java:16)
      	at com.atlassian.applinks.core.auth.ApplicationLinksStringReturningResponseHandler.handle(ApplicationLinksStringReturningResponseHandler.java:13)
      	at com.atlassian.applinks.oauth.auth.OAuthApplinksReturningResponseHandler.handle(OAuthApplinksReturningResponseHandler.java:50)
      	at com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:134)
      	at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:102)
      	at sun.reflect.GeneratedMethodAccessor1136.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
      	at com.atlassian.confluence.osgi.HostClassLoaderMethodInterceptor.invoke(HostClassLoaderMethodInterceptor.java:23)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
      	at com.sun.proxy.$Proxy3175.executeAndReturn(Unknown Source)
      	at com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:131)
      	at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.executeAndReturn(ApplicationLinkRequestAdaptor.java:56)
      	at com.atlassian.applinks.oauth.auth.OAuthRequest.executeAndReturn(OAuthRequest.java:84)
      	at com.atlassian.applinks.core.auth.AbstractApplicationLinkRequest.execute(AbstractApplicationLinkRequest.java:114)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.executeRest(JiraIssuesMacro.java:684)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.lambda$getTeamsByIds$4(JiraIssuesMacro.java:799)
      	at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1628)
      	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.getTeamsByIds(JiraIssuesMacro.java:798)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.getTeamInformation(JiraIssuesMacro.java:784)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.populateTeamNameData(JiraIssuesMacro.java:745)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.populateContextMapForStaticTable(JiraIssuesMacro.java:998)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.createContextMapFromParams(JiraIssuesMacro.java:466)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.execute(JiraIssuesMacro.java:1252)
      	at com.atlassian.confluence.extra.jira.executor.StreamableMacroFutureTask.renderValue(StreamableMacroFutureTask.java:74)
      	at com.atlassian.confluence.extra.jira.services.DefaultAsyncJiraIssueBatchService.lambda$processRequestWithJql$2(DefaultAsyncJiraIssueBatchService.java:183)
      	at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
      	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)
      	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)
      	at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$withRequestContext$1(VCacheRequestContextOperations.java:59)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      2021-03-16 16:12:31,672 ERROR [JIM Marshaller:thread-3] [extra.jira.helper.JiraExceptionHelper] throwMacroExecutionException Macro execution exception:
       -- url: /c7111/pages/viewpage.action | page: 1474562 | traceId: 6aa2959d20740f60 | userName: user002 | referer: http://localhost:27111/c7111/login.action?os_destination=%2Fpages%2Fviewpage.action%3FspaceKey%3DSO%26title%3DNew%2Bpage%2Bjira%2Bissues&permissionViolation=true | action: viewpage
      java.lang.NullPointerException
      	at java.util.ArrayList.addAll(ArrayList.java:581)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.lambda$getTeamsByIds$4(JiraIssuesMacro.java:800)
      	at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1628)
      	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.getTeamsByIds(JiraIssuesMacro.java:798)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.getTeamInformation(JiraIssuesMacro.java:784)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.populateTeamNameData(JiraIssuesMacro.java:745)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.populateContextMapForStaticTable(JiraIssuesMacro.java:998)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.createContextMapFromParams(JiraIssuesMacro.java:466)
      	at com.atlassian.confluence.extra.jira.JiraIssuesMacro.execute(JiraIssuesMacro.java:1252)
      	at com.atlassian.confluence.extra.jira.executor.StreamableMacroFutureTask.renderValue(StreamableMacroFutureTask.java:74)
      	at com.atlassian.confluence.extra.jira.services.DefaultAsyncJiraIssueBatchService.lambda$processRequestWithJql$2(DefaultAsyncJiraIssueBatchService.java:183)
      	at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
      	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)
      	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)
      	at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$withRequestContext$1(VCacheRequestContextOperations.java:59)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      
      

      Workaround

      Add jira-users to the Permission Shared team management permission in Jira Portfolio.

        1. JiraPortfolio-JiraIssueMacro Issue Reproduced.mp4
          25.11 MB
        2. JiraPortfolioPermission.png
          JiraPortfolioPermission.png
          659 kB
        3. screenshot-1.png
          screenshot-1.png
          91 kB
        4. ScreenshotError.png
          ScreenshotError.png
          25 kB
        5. Workaround adding an extra permission.png
          Workaround adding an extra permission.png
          20 kB

            [CONFSERVER-60605] Jira Issues Macro may not load for some users if the Team custom field from Advanced Roadmaps is chosen as a column to display

            rknu added a comment -

            The bug can be replicated easily, although the complexity of the fix remains uncertain. Given that the bug is of low priority and might not be addressed promptly, I'm looking to discover if there's a workaround for this issue.

            rknu added a comment - The bug can be replicated easily, although the complexity of the fix remains uncertain. Given that the bug is of low priority and might not be addressed promptly, I'm looking to discover if there's a workaround for this issue.

            Joshua Sisk added a comment - - edited

            We are facing this as well, and it is quite frustrating to the users. We can't just give everyone shared team management access, if a user accidentally changed around the shared teams it would cause huge issues.

            Edit: we are 9.x and still seeing this, FYI

            Joshua Sisk added a comment - - edited We are facing this as well, and it is quite frustrating to the users. We can't just give everyone shared team management access, if a user accidentally changed around the shared teams it would cause huge issues. Edit: we are 9.x and still seeing this, FYI

            our team is also facing the same issue. if we enabled jira-users permission to shared team management in advanced roadmap. wouldn't that make the permission in place nullify?

            Singa Selva Sankar added a comment - our team is also facing the same issue. if we enabled jira-users permission to shared team management in advanced roadmap. wouldn't that make the permission in place nullify?

            Michelle de Bruijn added a comment - Is this a duplicate of https://jira.atlassian.com/browse/CONFSERVER-60870?

            We are running into this bug as well with Confluence 7.4.6/Jira 8.5.4 and Crowd is our user store.

            Brian Roberts added a comment - We are running into this bug as well with Confluence 7.4.6/Jira 8.5.4 and Crowd is our user store.

              Unassigned Unassigned
              2e857505f334 Pascal Oberle
              Affected customers:
              33 This affects my team
              Watchers:
              27 Start watching this issue

                Created:
                Updated: