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β
- Create a gadget and paste the code below into Frontend HTML + JavaScript.
- Replace the
<iframe>element in the code with the one from your plan. - Check the plan in the preview.
- 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>
| Placeholder | Description |
|---|---|
example.atlassian.net | Your 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.
Relatedβ
- Gadgets: how gadgets work on dashboards.
- Write fragment code: sizing and dark theme.