Access Jira and Bitbucket Scopes in the same Forge app

Hi,
I’m trying to access the Jira api (querying for a jira issue) from a custom merge check app in Bitbucket:
await api.asApp().requestJira(route'/rest/api/3/issue/${jiraIssue}')
however I am getting the error below when trying to deploy:
Error: Workspace scopes can not be used with site scopes.
I have a Jira Cloud instance linked to the Bitbucket Cloud workspace.
What I have in my manifest:

modules:
  bitbucket:mergeCheck:
    - key: merge-check
      function: main
      name: merge-check
      description: merge check
      triggers:
        - on-merge
  function:
    - key: main
      handler: index.run
permissions:
  scopes:
    - read:pullrequest:bitbucket
    - read:repository:bitbucket
    - read:issue:jira

I tried to add a jira module to the manifest, however that doesn’t make a difference.

Is this something that is not available at the moment using Forge? Is there a plan to add this functionality in the future?

Hi @AlexiBrehovs, and welcome to the Atlassian Developer Community!

I’m afraid this is not possible right now, see Error when calling requestJira from bitbucket app - #2 by ibuchanan. Please watch and vote for, and ideally comment with your use case on the following issue to raise Atlassian’s priority regarding this important use case:

3 Likes