About UI Kit 2
UI Kit 2 components
UI kit components
Product bridge APIs
Jira bridge APIs

ViewIssueModal

The ViewIssueModal class enables your custom UI app to open the issue view modal for an issue.

It can be used by these modules:

Class signature

1
2
interface ViewIssueModalOptions {
  context: {
    issueKey: string;
  };
  onClose?: () => void;
}

class ViewIssueModal {
  constructor(opts: ViewIssueModalOptions);
  open(): Promise<void>;
}

Arguments

  • onClose: A callback function that runs when the issue view modal is closed.
  • context: Custom context that contains the key of the issue to open.

Example

This example shows how to open an issue view modal.

1
2
import { ViewIssueModal } from '@forge/jira-bridge';

const viewIssueModal = new ViewIssueModal({
  onClose: () => {
    console.log('ViewIssueModal closed');
  },
  context: {
    issueKey: 'CS-15',
  },
});

viewIssueModal.open();

Rate this page: