Forge jira:command module allows opening a modal, but without a resolver!

The Jira “command palette item” module allows to open a modal (besides redirecting to a page). But it seems not to be allowed to register a resolver function!? This does not make any sense to me. What would be the usecase for such a modal?

You can reproduce this by starting with the corresponding forge cli template. Then just add a simple resolver to it. The modal will then fail at runtime with an error message like:

Uncaught (in promise) Error: No matching validator for module type jira:command found.

Hi
Thanks for bringing this up, we are working on enabling resolvers for this module (It’s not ready but we will notify as soon as ready)

1 Like

Thank you, that’s great to hear

Hi @AndreasZink , resolvers should be usable now, can you confirm that issue is resolved

Hi @PavloBohdanRavliv, I could successfully use a resolver in the open modal. Thank you!

Unfortunately, the given context/extension data does not provide much information yet. It would be great to have the current project, issue, etc.
The Jira command palette currently obviously is aware of some context. E.g. it shows “issue actions” in case an issue is selected or opened. Maybe this context/extension data could also be passed to this module!?

Another cool feature for this module could be display conditions.

Cool got any Documentation on using the resolver or do we just guess :slight_smile:

1 Like

Seems like guessing is the way to go here… Docs don’t mention resolver at all as available for jira:command…

I did get it to work BTW this is the manifest structure:

  jira:command:
    - key: my-command
      title: 'Wheee'
      shortcut: n c
      target:
        resource: main
      resolver:
        function: resolver

Your default resolver will do, you just need it if there isn’t an obvious context for the resolver. When you have a command that goes to a global page, that pages’ resolver is the one used, e.g.

  jira:globalPage:
    - key: my-custom-page
      resource: main
      resolver:
        function: resolver
      title: Whoopie
  jira:command:
    - key: my-page-command
      title: Whoopie
      shortcut: g c
      icon: arrow-right
      target:
        page: my-custom-page

Hope that helps someone.