Skip to main content

Gadget example: Embed a plan

This gadget shows a Jira plan on a dashboard, in a frame. Use it when a team wants its plan next to the rest of its dashboard.

Applies to: Script Master for Jira Β· Cloud

Before you begin​

  • Jira permission: Jira admin, to create the gadget. Plans need Jira Premium or Enterprise.
  • App permission: an active Script Master license.
  • You have a Jira plan and its embed code: an <iframe> element that Jira gives you from the plan's sharing options.

Set it up​

  1. Create a gadget and paste the code below into Frontend HTML + JavaScript.
  2. Replace the <iframe> element in the code with the one from your plan.
  3. Check the plan in the preview.
  4. Turn on Enable and select Save.

Result: On a dashboard, the gadget shows the plan.

The code​

<!-- Replace this iframe with the embed code of your plan -->
<iframe src="https://example.atlassian.net/secure/PlanEmbeddedReport.jspa?r=<your-plan-report-id>" width="1024" height="640" style="border:1px solid #ccc;"></iframe>

<script type="module">
// Follow the viewer's light or dark theme
document.querySelector(":root").setAttribute("data-color-mode", theme.colorMode);
document.querySelector(":root").setAttribute("data-theme", `${theme.colorMode}:${theme.colorMode}`);
document.querySelector(":root").insertAdjacentHTML("afterbegin", `<link rel="stylesheet" href="https://forge.cdn.prod.atlassian-dev.net/atlaskit-tokens_${theme.colorMode}.css" />`);
</script>
PlaceholderDescription
example.atlassian.netYour site's address, as it appears in your plan's embed code
<your-plan-report-id>The report ID from your plan's embed code

The gadget's frame grows to fit the plan's height. Change width and height to fit the dashboard column.