Atlassian Forge - missing context parameters for Collapsed Dynamic Property Handler

I’ve added a Collapsed Dynamic Property handler to my Forge App, as per here:
https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-issue-context/#dynamic-properties

When I load an Issue in the Issue View or Issue List, I see the Collapsed Dynamic Property, no problem:
Untitled

However, I see in the Atlassian Forge Developer Console logs that I am getting errors in Production, because the extension context paramter is not present. Instead, I only get this passed into the handler:

{ extension: { "type": "jira:issueContext" } }

And then, from my code:

Error: Atlassian Error: could not find Issue ID
    at checkAtlassianContextPresentInRequest (webpack://jira-issue-panel-ui-kit/src/TeamformLinkToTeam/backend/requestResponseValidation.js:49:13)
    at <anonymous> (webpack://jira-issue-panel-ui-kit/src/TeamformLinkToTeam.js:136:7)
    at Object.collapsed (webpack://jira-issue-panel-ui-kit/src/TeamformLinkToTeam.js:299:66)

My app relies on the extension field being present. Like this:

{
  extension: {
    "type": "jira:issueContext",
    "issue": {
      "key": "DUN-9",
      "id": "10009",
      "type": "Task",
      "typeId": "10001"
    },
    "project": {
      "id": "10000",
      "key": "DUN",
      "type": "software"
    }
  }
}

Is this where I am going wrong? Are there some areas of Jira, that I am not aware of, that only pass in a context with the extension field missing? I’m aware of Issue View, Issue List, both of which DO pass in the extension field. And yet I get these errors. Are there any others?

1 Like