This page is based on source code analysis. Some UI details may vary depending on your version. Verify the behavior in your Gantt installation.
Prerequisites
- A Gantt widget in Edit mode
- Undo/redo is loaded automatically at Gantt startup — no additional configuration is required
How Undo and Redo Works
The Gantt maintains a history of changes made during an edit session. Each time you move a task bar, resize a task, or modify a value, the action is recorded. You can step backward through these changes with Undo and forward again with Redo.| Setting | Default Value | Description |
|---|---|---|
undo_steps | 10 | Maximum number of changes stored in the undo history |
Use the Undo and Redo Buttons
- Click Edit in the Gantt toolbar to enter Edit mode
- Make one or more changes — for example, drag a task bar to a new date
- Click the Undo button in the toolbar to reverse the last change
- Click the Redo button to reapply a previously undone change
- Continue undoing or redoing as needed, up to the
undo_stepslimit
Change the Undo History Depth
By default, the Gantt stores up to 10 undo steps. To increase or decrease this limit, modify the Gantt Config Script:- Open the Polarion page containing the Gantt widget
- Edit the widget properties
- Navigate to Advanced > Gantt Config Script
- Set the
undo_stepsproperty:
Higher undo step values consume more browser memory. For large Gantt charts with many tasks, test the impact of increasing this value on client-side performance.
Interaction with Editing Modes
The availability of undo and redo depends on your editing configuration:| Configuration | Undo/Redo Available | Notes |
|---|---|---|
| Default (Edit/Close buttons) | Yes, in Edit mode only | Buttons appear after clicking Edit |
alwaysedit = true | Yes, always visible | Gantt is always in edit mode |
readonly = true | No | All editing is disabled |
hideToolbar = true | Not in toolbar | Toolbar is hidden; hideToolbar forces alwaysedit = true |
Verify Your Configuration
- Enter Edit mode in the Gantt
- Drag a task bar to a new date position
- Click Undo in the toolbar
- You should now see the task bar return to its original position
- Click Redo to move it back to the new position
See Also
- Handle Unsaved Changes and Session Timeout for understanding change persistence
- Configure the Toolbar and Menus for toolbar button visibility
- Perform What-If Analysis Without Saving for exploring schedule alternatives
- Use the Lightbox Inline Editor for editing work item fields
Sources
Sources
Source Code
prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/default.jsonprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/components/toolbar.jsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/gantt.jsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/config.js