Create a fragment
Create a fragment to add your own panel, action or page to Jira or Confluence. You write the code, check it in the live preview, then turn it on for the people who use that location.
Applies to: Script Master for Jira and Script Master for Confluence Β· Cloud
Before you beginβ
- Jira or Confluence permission: Jira admin (the Administer Jira global permission) or Confluence admin. Only admins can open Script Master.
- App permission: an active Script Master license. Without one, you can't create fragments.
- The site has fewer than 100 fragments.
Open the editorβ
-
In Script Master, open the Fragments tab. On a narrow window it can sit under More.
-
Choose how to start:
- Select Create fragment for an empty editor.
- Select the arrow next to Create fragment (More ways to create) > From a template to start from a working example.
- Select the arrow > Import to paste a fragment exported from another site. See Import, export and duplicate.
Before the first fragment, the tab shows Create fragment, From a template and Import as separate buttons.
-
If you picked From a template, the Start from a template dialog opens. Select a template.

The editor opens with the template's title, description, location and code filled in.
Templatesβ
- Jira
- Confluence
| Template | Location | What it does |
|---|---|---|
| Display contributors | Work item panel | Lists everyone who has edited this work item |
| Display assignee changes | Work item panel | Shows every change of assignee on this work item |
| Delete all work item links | Work item action | Removes every link from the current work item. It can't be undone |
| Embed a YouTube video | Work item panel | A video that follows the dark theme and resizes itself |
| Template | Location | What it does |
|---|---|---|
| Recent contributors | Page byline item | Lists the people who changed this page recently |
| Count sentences, words and characters | Page byline item | Counts what is on this page |
| Show an inspiring quote | Page action | Fetches a quote from an external REST API and shows it |
| Read the page aloud | Page action | Text to speech, with a choice of voices, pitch and speed |
| Embed a YouTube video | Space page | A video that follows the dark theme and resizes itself |
Fill in the fragmentβ
-
In Title, enter the name people see in the fragment list. Up to 128 characters.

-
In Location, select where the fragment shows. A new fragment starts on Work item panel in Jira and Page byline item in Confluence. See Where fragments can show.
-
In Description, say who the fragment is for and what it does. People see it under the title. Up to 256 characters.
-
In Spaces, select the spaces where the fragment shows. Leave it empty to show it in every space. In Confluence, search with the exact space key.
-
In Frontend HTML + JavaScript, write the fragment's code. Put JavaScript in
<script>tags. See Write fragment code. -
Check the result in the Preview beside the code. See Preview your code.
Title, Description and the code are required. If one is empty when you save, it's marked This field is required and nothing is saved.
Save and turn it onβ
- Select Save, or press
Ctrl+S(Cmd+Son a Mac). To add a note to this version, select the arrow next to Save > Save with noteβ¦. - Turn on Enable at the top of the editor.
- Select Save again.
Result: Script Master shows "Fragment saved!" with the version number. The fragment shows in its location for people in the chosen spaces.
You can also switch a fragment on or off from the list, with the switch in its Status column.
Change or remove a fragmentβ
In the Fragments tab, select the fragment's name to open it in the editor. Each row's β’β’β’ menu also has Version historyβ¦, Turn on or Turn off, Duplicate, Export and Deleteβ¦.
To delete a fragment:
-
In the fragment's row, select β’β’β’ > Deleteβ¦.
-
Select Delete to confirm.
warningDeleting can't be undone. The fragment stops showing at once, and its failure record and version history go with it. Export it first if you might need it again.
Result: Script Master shows that the fragment was deleted, and it's gone from the list.
Relatedβ
- Fragments: what fragments are and where they show.
- Preview your code: run the code with real data before anyone sees it.
- Version history: compare and restore earlier versions.
- Failures: what the fragment list and editor show when code fails.