You may want to control which items can be moved in the timeline and which cannot. For example, you might want to allow only Epics to be moved, while preventing User Stories and Tasks from being shifted in time. This article explains how to implement this functionality.
To prevent User Stories and Tasks from being moved in the Gantt, you can add the following script to the 'Gantt Properties' -> 'Item Script' section:
if(wi.getType().getId()==="userstory" || wi.getType().getId()==="task"){ task.readonly = true; }
Disable moving based on different properties
In addition to restricting movement for specific work item types, you can do also based on custom properties, such as status or assignee. The script would be similar to the first one, with some changes:
if (wi.getStatus().getId() === "draft") { task.readonly = true; }
Dragging children
If the Work Items you want to prevent from being moved are children of other Work Item types, they will, by default, move along with their parent. To stop this, disable the Drag Children with Parent button on the toolbar. This ensures that when you move the parent, the child items will remain in their original positions.
If you have additional customization requirements or encounter issues, feel free to reach out to us at [email protected]
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article