Skip to main content

How Unsaved Change Protection Works

The Gantt tracks every modification you make during an edit session — dragging task bars, resizing durations, editing fields in the lightbox, and creating new tasks. When the Gantt detects unsaved changes and you attempt to navigate away, it intervenes to prevent data loss. diagram The Gantt intercepts three types of navigation when you have unsaved changes:
Navigation TypeProtectionDialog
Close browser tab / windowBrowser beforeunload eventBrowser’s built-in “Leave site?” prompt
Click a link on the pageLink click interception”Discard changes?” confirmation dialog
Browser back / forward buttonHistory navigation interception”Discard changes?” confirmation dialog
When any of these events occur:
  1. The Gantt checks whether there are unsaved changes (dirty state)
  2. If changes exist, a confirmation dialog appears
  3. Choose Cancel to stay on the page and continue editing
  4. Choose Discard (or leave the page) to abandon unsaved changes
The Gantt undo history stores up to 10 changes by default. For complex rescheduling involving many tasks, save periodically to avoid losing work if the browser crashes or the session expires.

Save Your Changes

To persist your edits to Polarion:
  1. Click the Save button in the Gantt toolbar (or the floating save button if the toolbar is hidden)
  2. A progress indicator appears during the save operation
  3. After a successful save, the dirty state clears and navigation protection is removed
  4. If no changes exist, the save button does nothing

Recover from Session Timeout

When your Polarion session expires while you are editing the Gantt — for example, due to SSO logout or inactivity timeout — the save operation may fail.
Starting with version 24.9.2, the Gantt displays a clear notification when your session has expired during editing. To recover your unsaved work:
  1. Open a new browser tab
  2. Log in to Polarion in the new tab
  3. Return to the Gantt tab
  4. Click Save again — your changes are preserved in the browser and will save successfully with the new session
In versions before 24.9.2, a session timeout during editing could result in a save failure without clear feedback. Update to the latest version for improved session management. See Update to the Latest Version.

Dirty State Tracking

The Gantt maintains a dirty state flag that indicates whether any unsaved changes exist. This flag drives several behaviors:
  • The Save button becomes active when changes are pending
  • Navigation protection activates when dirty state is true
  • The dirty state clears after a successful save or when you explicitly discard changes
  • Each individual task also tracks its own dirty state, enabling the Gantt to identify which specific work items need updating

Interaction with Editing Modes

ConfigurationUnsaved Change Protection
Default (Edit/Close buttons)Active during edit mode; clears on Close Editing
alwaysedit = trueAlways active when changes exist
readonly = trueNot applicable — no editing possible
hideToolbar = trueActive; a floating save button appears for saving

Verify Your Configuration

  1. Enter Edit mode and drag a task bar to a new date
  2. Try to navigate to another page by clicking a link
  3. You should now see a “Discard changes?” confirmation dialog
  4. Click Cancel to return to the Gantt, then click Save to persist your change

See Also

Support TicketsSource Code
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/lib/pageLeaveHandler.js
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/functions.js
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/components/toolbar.js
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/default.json
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/GanttWidgetConfig.java