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.Navigation Protection
The Gantt intercepts three types of navigation when you have unsaved changes:| Navigation Type | Protection | Dialog |
|---|---|---|
| Close browser tab / window | Browser beforeunload event | Browser’s built-in “Leave site?” prompt |
| Click a link on the page | Link click interception | ”Discard changes?” confirmation dialog |
| Browser back / forward button | History navigation interception | ”Discard changes?” confirmation dialog |
- The Gantt checks whether there are unsaved changes (dirty state)
- If changes exist, a confirmation dialog appears
- Choose Cancel to stay on the page and continue editing
- Choose Discard (or leave the page) to abandon unsaved changes
Save Your Changes
To persist your edits to Polarion:- Click the Save button in the Gantt toolbar (or the floating save button if the toolbar is hidden)
- A progress indicator appears during the save operation
- After a successful save, the dirty state clears and navigation protection is removed
- 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.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
| Configuration | Unsaved Change Protection |
|---|---|
| Default (Edit/Close buttons) | Active during edit mode; clears on Close Editing |
alwaysedit = true | Always active when changes exist |
readonly = true | Not applicable — no editing possible |
hideToolbar = true | Active; a floating save button appears for saving |
Verify Your Configuration
- Enter Edit mode and drag a task bar to a new date
- Try to navigate to another page by clicking a link
- You should now see a “Discard changes?” confirmation dialog
- Click Cancel to return to the Gantt, then click Save to persist your change
See Also
- Use Undo and Redo for reversing changes before saving
- Troubleshooting Save Failures for resolving save errors
- Configure the Toolbar and Menus for toolbar and save button visibility
- Perform What-If Analysis Without Saving for exploring changes without committing
Sources
Sources
Support TicketsSource Code
prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/lib/pageLeaveHandler.jsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/functions.jsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/components/toolbar.jsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/default.jsonprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/GanttWidgetConfig.java