Referencing Custom Issue Field to pass in as a Context Parameter Atlassian-Connect

I’m trying to pass in the value of a jiraIssueField I define as a module into a webPanel item as a context parameter.

I’ve defined modules here:

I reference the custom field as addonkey__customfieldkey (separated by double underscore) in atlassian-connect.json

"modules": {
    "jiraIssueFields": [
      {
        "description": {
          "value": "Client email custom field"
        },
        "type": "string",
        "name": {
          "value": "Client Email"
        },
        "key": "email"
      }
    ],
    "webPanels": [
      {
        "key": "profile",
        "location": "atl.jira.view.issue.right.context",
        "name": {
          "value": "Profile"
        },
        "url": "/profile?clientEmail={addonkey__email}"
      }
    ]
  }

The value being passed is NULL though.

Is there anything I’m missing? Is there a prefix to reference custom fields in the URL for the webPanel?

Appreciate your help

Hi @asjadathick,

You can’t pass in an individual field value as a context parameter. In the example you’ve presented, you’ve defined an Issue Field called “Client Email”. JIRA doesn’t currently implicitly consider the issue context when it loads your web panel.

What I would recommend is you use the issue.id context parameter, like "url": "/profile/{issue.id}" and then make a client-side request for the field value from your add-on using AP.request to a URL like /rest/api/2/issue/{issue.id}?fields={addonkey__email}.
Make sense?

1 Like

Hi @dmeyer,

I thought as much. Your suggestion does makes sense. I was trying to avoid that because of the extra API call and Auth requirements.

That will have to do for now I guess. Thanks for your help!

Understood. If you use our Atlassian Connect frameworks for Node or Spring Boot, the JWT token handling should mostly be handled for you.

1 Like

Is a change to this behavior being considered? I’m dealing with a similar situation involving entity parameters. My add-on is a simple integration with an external service and currently is only using the Atlassian Connect JSON, so working around this would add considerable complexity.