UI Kit components
Jira UI Kit components
UI Kit hooks
Forge bridge APIs
Jira bridge APIs
Upgrade UI Kit versions
Previous versions

ViewIssueModal

The ViewIssueModal class enables your UI Kit and 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: