Project issue view

The project.issues.view slot adds a view to the project's issue view switcher. Use it to display a report, chart, or another interface for issues selected by the project filter.

When you select the plugin, its interface occupies the results area. The filter controls remain available. The view name comes from the plugin manifest's title field.

The slot works on the full project page in the desktop interface. It isn't used in the mobile interface or project side panel. The global issue list uses a separate slot, issues.view.

Configuring the slot

Create a project with weavix create and select the project.issues.view template. In an existing project, add the slot to slots.tracker in the manifest:

{
  "slots": {
    "tracker": {
      "project.issues.view": [
        {
          "entrypoint": "index.html",
          "contextLevel": "full",
          "title": {
            "ru": "Мое представление проекта",
            "en": "My project view"
          }
        }
      ]
    }
  }
}

This is a manifest fragment: keep the other required fields in your project. Set contextLevel to full to receive the issue filter. The basic level returns only { entityId: string }. Here, entityId is the numeric project ID from the URL, passed as a string.

After enabling the plugin, open the project's issues and select the view with the name from the manifest. You can open it from the project's list, calendar, Gantt, or board view switcher. Selecting the plugin opens the project issue list and uses that list's filter. Separate calendar, Gantt, or board filter settings aren't transferred to it.

For plugin preparation and setup, see Preparing a plugin for publishing.

Slot context

The SDK exports the ProjectIssueViewSlotContext, ProjectIssueViewFilter, and ProjectIssueFilterValue types:

type ProjectIssueFilterValue =
    | string
    | number
    | boolean
    | null
    | ProjectIssueFilterValue[]
    | { [key: string]: ProjectIssueFilterValue };

type ProjectIssueViewFilter = {
    filter: Record<string, ProjectIssueFilterValue>;
    order?: string;
};

type ProjectIssueViewSlotContext = {
    entityType: 'issues';
    projectId: string;
    filter: ProjectIssueViewFilter;
    groupBy?: string;
    tree?: boolean;
};

projectId is the current project's numeric ID from the URL, passed as a string. For example, /pages/projects/123/issues produces "123". The context doesn't include the full project object or an array of matching issues.

slotContext.filter contains the applied parameter-based filter:

Field in slotContext.filter

Contents

filter

Filter field names and their values. Nested objects and arrays retain their structure

filter.project

Current project ID, matching slotContext.projectId. Restricts the issue selection to this project

filter.keyOrSummary

Text from the separate search field, if set. Tracker has already added it to the criteria

order

Optional sorting: for example, +updated for ascending order or -updated for descending order

The optional groupBy (grouping field) and tree (tree view flag) fields are at the top level of the context. QL2 expressions are available in the global issue list slot issues.view.

For example, for project 123:

{
  "entityType": "issues",
  "projectId": "123",
  "filter": {
    "filter": {
      "project": "123",
      "status": ["open"],
      "keyOrSummary": "error"
    },
    "order": "-updated"
  },
  "groupBy": "status",
  "tree": false
}

Receiving and updating the context

Call useTrackerPluginContext in a component inside TrackerPluginProvider:

const { slotContext } = useTrackerPluginContext<'project.issues.view'>('full');

slotContext may be undefined until the project filter is ready. When the project or applied filter changes, the hook receives the new context and updates the component.