Use UI Kit 2 in jira:customFieldType Edit module

Hey,

currently, in the jira:customFieldType module, it is allowed to use Custom UI for the Edit entry point but not UI Kit 2. Is there any specific reason for this?

When I want to set up UI Kit 2 like this

modules:
  jira:customFieldType:
    - key: x
      name: y
      description: ...
      icon: ...
      type: string
      function: view
      edit:
        resource: newRessource
        render: native

When I do this I get the following error during forge deploy:
Error: Resource new at: [path to resource] is an empty directory

When I set up the same resource to be used in a jira:globalPage for example this error does not occur and the deploy is successful.
When I use the same resource in both the jira:globalPage and the jira:customFieldType-Edit it works, and it even renders my UI Kit 2 UI correctly for the Edit entry point :cowboy_hat_face:.

So can you update the CLI to support UI Kit 2 for the Edit entry point of CustomFieldType?

It would really improve the experience for our customers.

Info: I have also created ECOHELP-37863 for tracking, maybe you can turn it into a public ticket.

1 Like

Just a quick addition:
When I set a folder location for the ressource in the manifest, the app gets deployed, but the App does not load. I believe this is because bundling gets skipped, like for a custom UI app where I have to bundle manually and the deployed app is looking for an index.html to render.

resources:
  - key: newRessource
    path: src/static/uikit2/

When I set the resource to a .tsx file like this (which works for other modules that support UI Kit 2)

resources:
  - key: newRessource
    path: src/static/uikit2/edit.tsx

I can’t deploy with the error mentioned above, because some action in the build process expects a folder here.

I think I figured it out now.

In the Manifest the render: native property also has to be there as a property of jira:customFieldType and cannot be used only for the edit entry point.

It is a bit unfortunate because now I have to introduce UI Kit 2 for the edit (as originally planned) and view entry points at the same time. It would be nice to be able to do this progressively, but I think I will manage it this way too.

2 Likes