While custom fields and subtask issue type are not supported now, they may be added in the future.
The CreateIssueModal
class enables your custom UI app to open an issue create modal pre-filled with data you supply.
1 2interface CreateIssueModalOptions { context?: { projectId?: string; issueTypeId?: string; parentId?: string; summary?: string; description?: Record<string, any>; environment?: Record<string, any>; assignee?: string; reporter?: string; labels?: string[]; duedate?: string; priority?: string; components?: string[]; versions?: string[]; fixVersions?: string[]; }; onClose?: (args: { payload: { issueId: string; }[]; }) => void; } class CreateIssueModal { constructor(opts?: CreateIssueModalOptions); open(): Promise<void>; }
The description
and environment
fields must be in an Atlassian Document Format.
This example shows how to open an issue create modal with pre-filled fields.
1 2import { CreateIssueModal } from '@forge/jira-bridge'; const createIssueModal = new CreateIssueModal({ onClose: (payload) => { console.log('CreateIssueModal is closed with', payload); }, context: { projectId: '10114', issueTypeId: '10004', parentId: '10152', // epic id summary: 'Issue summary', description: { version: 1, type: "doc", content: [] }, environment: { version: 1, type: "doc", content: [] }, assignee: '5cfa7fca3fa1890e7f17075e', reporter: '5cfa7fca3fa1890e7f17075e', labels: ['label-one', 'label-two'], duedate: '2022-02-28', priority: '2', components: ['10294', '10295'], versions: ['10039'], fixVersions: ['10039'], }, }); createIssueModal.open();
Rate this page: