---
metadata:
  - name: generator
    content: Diplodoc Platform v5.66.1
  - property: og:type
    content: article
  - property: article:section
    content: Plugin platform
  - property: og:title
    content: Adding a plugin to the issue creation form picker
  - property: article:tag
    content: Technical guide
alternate:
  - https://yandex.ru/support/tracker/en/plugins/slots/issue-create-form.md
  - https://yandex.ru/support/tracker/ru/plugins/slots/issue-create-form.md
  - href: https://yandex.ru/support/tracker/en/plugins/slots/issue-create-form.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/support/tracker/en/llms.txt?revision=r22057024
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/tracker/en/llms.txt?revision=r22057024


# Adding a plugin to the issue creation form picker

The `issue.create.form` slot adds a plugin card to the form picker for the selected queue on the issue creation page. Clicking the card opens the plugin on a separate page, where it can provide a custom way to create issues.

The issue creation side panel has a separate slot, `drawer.issue.create.form`. Its card also appears among the forms, but the plugin opens inside the panel. Declare both slots in the manifest if your plugin needs to work in both locations.

The `issue.create.form` slot works on the desktop issue creation page. The plugin card is not displayed in the mobile version. The compact form picker at `/issueCard/create` does not display plugins either.

## Enabling the slots {#connect-slots}

Create a project with `weavix create` and select the `issue.create.form` template. The template adds both slots. In an existing project, add the required slots to `manifest.json`:

```json
{
  "permissions": {
    "data": ["tracker:issues:write"]
  },
  "slots": {
    "tracker": {
      "issue.create.form": [
        {
          "entrypoint": "index.html",
          "contextLevel": "full",
          "title": {"ru": "Создать задачу с плагином", "en": "Create an issue with a plugin"}
        }
      ],
      "drawer.issue.create.form": [
        {
          "entrypoint": "index.html",
          "contextLevel": "full",
          "title": {"ru": "Создать задачу с плагином", "en": "Create an issue with a plugin"}
        }
      ]
    }
  }
}
```

This is a manifest fragment: keep the other required fields in your project. To create an issue through the Tracker API, the plugin needs the `tracker:issues:write` permission. It does not extend the user's permissions: the issue is created within their existing access. For more information about manifest fields, see [Plugin configuration](https://yandex.ru/support/tracker/en/plugins/common.md#manifest).

The template provides an interface stub but does not create an issue. Add the required fields and an API call to the plugin code.

Enable the plugin for a queue and open the issue creation page with that queue selected. The plugin card appears next to the standard forms. The open plugin header displays its name and a "Plugin" label. For more information about enabling plugins, see [Publishing a plugin](https://yandex.ru/support/tracker/en/plugins/publish.md).

## Getting the selected queue context {#slot-context}

When the plugin opens, the issue has not been created yet. In the basic context, the selected queue key is available as `entityId`. If the manifest specifies `contextLevel: "full"`, get the key from `slotContext.queue`:

```tsx
const { slotContext } = useTrackerPluginContext<'issue.create.form'>('full');
const queue = slotContext?.queue;
```

For `drawer.issue.create.form`, the full context also contains optional fields:

- `defaultFields?: Record<string, string>`: Field values passed when the side panel opens.
- `sourceUrlParams?: Record<string, unknown>`: Parameters that the calling screen passes to the standard issue creation form. For example, a project calendar can pass the project.

If your creation workflow needs these values, the plugin must apply them itself. Tracker does not insert them into the issue created by the plugin.

## Completing the plugin workflow {#close-plugin}

Create an issue through the Tracker API. For the side panel slot, pass the issue key to `hostApi.close({ issueKey })` after creation succeeds. The calling screen receives the result and closes the panel. Calling `hostApi.close()` without a result returns the user to the form picker.

On the separate `issue.create.form` page, calling `hostApi.close()` returns to the form picker. This slot has no dedicated creation result. If the plugin has unsaved data, call `hostApi.preventClose(true)`. Tracker asks for confirmation if the user tries to leave the page, switch queues, or close the panel.
