Skip to main content

Version history

Every save of a script in Script Master becomes a version. Version history shows who changed what and when, compares any two versions, and restores an old one. A restore adds a new version, so the history is never rewritten.

What is versioned​

Each version keeps the item's code and its settings.

ItemProductCodeSettings kept
FragmentJira, ConfluenceThe HTML and JavaScriptTitle, description, location, spaces
GadgetJiraThe HTML and JavaScriptTitle, description
MacroConfluenceThe HTML and JavaScriptTitle, description
Web triggerJira, ConfluenceThe scriptTitle
Scheduled jobJira, ConfluenceThe scriptTitle, description, schedule
UI modificationJiraThe rules or the scriptName, description, scope
Scripted custom fieldJiraThe script of one field contextNot applicable
Post function, validator, conditionJiraThe script or expression, and the rules a validator or condition was built withNot applicable

A save that changes neither code nor settings adds no version. Turning an item on or off adds no version either, and a restore never turns an item on or off.

Before you begin​

  • You need the Administer Jira global permission, or Confluence administrator rights.
  • The item must be saved at least once. Before that, Version history is unavailable, with the tooltip Save it first: every save becomes a version.

Open the version history​

Open it from any of these places:

  • In the item's editor, select Version history, next to Save.
  • In the module's list, open the row's Actions menu and select Version history….
  • On the Overview, select a row under Recently changed.

The version history of a fragment with the version list on the left and a side-by-side comparison on the right

The version history opens above the page. On the left is the list of versions, newest first. Each row shows:

  • The version number, with Live on the version in use.
  • Who saved it and when.
  • What changed, such as Code, Title or Schedule.
  • The note, or No note. A new item's first version has the note Created.
  • For fragments, gadgets, macros and UI modifications, how often the code failed: 3 failures since on the live version, 2 failures while live on older ones.

The list ends with Kept: the last 50 versions.

Compare two versions​

  1. Select a version in the list. It's marked Comparing.

  2. In the second picker, choose what to compare it with. The default is Live now.

    The settings that differ show above the code, with the old value and the new one. The code shows below with changes highlighted.

  3. Select Side by side or Inline to change how the code is shown.

Result: You see every change between the two versions. Unchanged lines are folded away.

UI modifications built with rules are compared as the rules in plain words, one rule per line.

Restore a version​

  1. Select the version you want back.

  2. Select Restore v3…, with the number of that version. A confirmation appears at the bottom.

  3. If the settings differ, select Also restore v3's settings to bring back the title, description, location, spaces or schedule too. Without it, only the code goes back.

  4. Optionally, change the note. It starts as Restored v3.

  5. Select Restore as v15, with the next version number.

    warning

    If the editor has unsaved changes, restoring discards them and reloads the editor.

Result: The old code goes live as a new version, and the editor reloads. A message names the item, for example Restored "Weekly report" v3 as v15, and offers Undo. Undo restores the version that was live before, which adds one more version.

You can't restore the live version. A version with the same code and settings as the live one is refused with v3 is the same as the live version.

Open a version in the editor​

To start from an old version and change it before saving, select Open v3 in editor. The editor gets that version's code, unsaved. Nothing is saved until you select Save, which adds a new version.

Open in editor appears only when you open the history from an editor, not from a list row.

Add a note to a version​

A note says what changed and why. It can be up to 200 characters.

  • To add a note while saving, select the arrow next to Save, then Save with note…. Type the note and select Save.
  • To add or change a note later, select the pencil next to a version's note in the history.

Scripted fields and workflow rules in Jira​

Scripted custom fields and workflow rules live in Jira, so their history works a little differently.

  • Open the history with Version history in the field context's script editor.
  • Each save in that editor adds a version, and restore works as described above.
  • When someone changes the script elsewhere, for example through Jira's REST API, the change is recorded as a version by Jira, labeled Changed outside Script Master.
  • When the field or the context is deleted in Jira, its history is deleted too. A field in Jira's trash keeps its history.

Items saved before version history​

An item last saved before version history existed shows No versions yet. Its next save keeps what is live as v1, labeled Before version history, and adds the new version as v2.

Changes made outside Script Master​

When what is live differs from the last saved version, the history shows What is live differs from v9. For a workflow rule, this happens when the workflow was copied or edited elsewhere. The next save in Script Master records the change.

Limits​

  • Each item keeps its last 50 versions. The oldest is removed when a new one is saved.
  • Code can be up to 230 KiB. A larger script can't be saved.
  • Deleting an item deletes its version history. This can't be undone.
  • A duplicate starts its own history at v1, with the note Duplicated from "Weekly report". An import starts at v1 with the note Imported. An export doesn't include the history.
  • In team-managed workflows, a space admin who isn't a Jira admin can edit a rule, but no version is recorded and the history doesn't open.