Forge connectModules new jiraIssueContexts

Hi,

It seems that the new IssueContext Module is not yet working as connectModule, or did someone manage to get it working?
I tried different names after which I looked through the manifest, which does not seem to contain the issueContext module within the connectModules

Hi @m.herrmann, thanks for reaching out!

Have you tried to use Forge jira:issueContext module instead?
https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-issue-context/

There is no need to use connectModules for that one.

Best regards,
Łukasz

Hi @ljarzabek ,
Thanks for the reply. I just tried it and get the following message:

jira:issueContext required properties are 'function, label, title, key' or 'label, resource, title, key'

How should I write this for a connect URL? As far as I can see, “function” is for UI Kit Resources and “resource” is for Custom UI. Or is there a way to use the Connect URL in one of them?

@m.herrmann, I think I misunderstood your use case. Are you working with Forge or Connect app?

We have dedicated modules for Forge and for Connect as well, so there should be no need to mix them, unless you have a very specific use case.

You can find code snippets with examples in our docs. For Forge, you can even use forge create to generate template app with issue context module hello world.

I hope it helps.

Best regards,
Łukasz

@ljarzabek
My useCase is a connect app where I want to add forge features and therefore followed the guide here:
https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/

Ok, is it possible for you to use that dedicated Connect module in your app then? Or do you need something specific that exists only in Forge?

As far as I understand when I start using connect on forge, I can no longer use the atlassian-connect.json modules and am forced to use the forge connectModules instead. The connectModules however don’t seem to have the needed issueContext.
I just created a support ticket for it

I would recommend to use dedicated Connect/Forge modules in your case, i.e. if you are building Connect app, the best option is to use Connect IssueContext module. The same for Forge, the best choice would be to use Forge jira:issueContext module.

I believe it still should work even if you are using connectModules for other modules in your app. So instead using IssueContext in your Forge connectModules section, please try to add Forge module to your manifest.

Could you provide a link for support ticket? Thank you!

Best regards,
Łukasz

sure, it’s this one:
https://ecosystem.atlassian.net/servicedesk/customer/portal/34/ECOHELP-17485

Maybe I’m not understanding something here, but if I want to migrate our plugin to connect on forge (to be able to use the forge customFieldTypes) I can no longer use the plain IssueContext Module from connect but need something like this in the forge manifest:

connectModules:
  jira:issueContext:
    - key: aptis-esu-issue-panel
      .....

this currently throws the following error:

23:2    error    invalid value 'jira:issueContext' in connectModules  valid-connect-module-required

I checked the validation manifest of the forge cli and could not find the issueContext within connectModules

How should this looks like?
Lets say my original atlassian-connect.json module looks like this:

{
  "modules": {
    "jiraIssueContexts": [
      {
        "key": "aptis-esu-issue-panel"
        "target": {
		"type": "web_panel",
		"url": "/showIssuePanel"
	},
      }
    ]
  }
}

The forge manifest only allows the url type within “connectModules”. If I put it into the forge modules it requires either “function” or “resource”. As a result I would need to rebuild this connect module to CustomUI

1 Like

@m.herrmann, sorry. I think I misunderstood the problem at the beginning.

Yeah, unfortunately if you decide to use dedicated Forge module, you have to implement a function and basically follow Forge guidelines of writing the extensions. You cannot use your Connect url.

But I can see that within the ticket you created, there is a suggestion how to use your module inside connectModules: Log in with Atlassian account

Please let us know if it helps.

Best regards,
Łukasz

@ljarzabek
Thanks for the responses anyway, it could have helped and I was not very clear with my initial posts about our use case.
Unfortunately the suggestion did not help and it seems that I forget to put some information into the ticket that I did write here.
I assume the issueContext Module is not yet supported by connect on forge and needs additional work to be implemented. As far as I read about the connectModules in forge in another RFC, this functionality seems not to work out of the box

I managed to resolve this with the help of the support request and --no-verify:
In the atlassian-connect.json the issueContexts have the url within the target property, but as connectModule the url needs to be on the same level as key and may look like this

connectModules:
  jira:jiraIssueContexts:
    - key: exampleKey
      icon:
        width: 36
        height: 36
        url: "/public/images/demo.gif"
      content:
        type: label
        label:
          value: Show
      url: "/showIssueContext"
      name:
        value: Example Issue Context
1 Like