Add a Link as part of a Flag in Jira/Confluence | HowTo

Looking for a way to add a clickable link to a flag like the “View Project” one in the screenshot below?

This is possible by adding the navigate method available as part of the router to the showFlag actions:

showFlag({
  id: 'project-created',
  title: 'Project Created',
  description: `The project "${data.project_name}" with key "$(data.project_key}" has been successfully created.`,
  type: 'success',
  isAutoDismiss: true,
  actions: [
    {
      text: 'View Project',
      onClick: () => {
        router.navigate(`/browse/${data.project_key}`);
      },
    }
  ]
});

As a reminder the showFlag bridge method can be used both in UI Kit and custom UI apps to open flags in the product’s flag group.

This flag is useful to confirm the success of an operation and guide the user to navigate to a page as a result.
Some examples of when this can be beneficial include:

  • page creation in Confluence
  • project creation in Jira
  • issue creation in Jira
1 Like