Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Allow rescheduling of manually scheduled parent work package (clamps) in gantt view

Aleix Suau1b1be75b4467
diff --git a/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts b/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts
index 7536a168098..ee641a40466 100644
--- a/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts
+++ b/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts
@@ -396,7 +396,8 @@ export class TimelineCellRenderer {
let selectionMode = renderInfo.viewParams.activeSelectionMode;
// Cannot edit the work package if it has children
- if (!wp.isLeaf && !selectionMode) {
+ // and it is not on 'Manual scheduling' mode
+ if (!wp.isLeaf && !selectionMode && !wp.scheduleManually) {
bar.classList.add('-readonly');
} else {
bar.classList.remove('-readonly');
diff --git a/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell-mouse-handler.ts b/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell-mouse-handler.ts
index ad157c6328a..03e7c2c5a53 100644
--- a/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell-mouse-handler.ts
+++ b/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell-mouse-handler.ts
@@ -108,9 +108,10 @@ export function registerWorkPackageMouseHandler(this:void,
workPackageTimeline.disableViewParamsCalculation = true;
mouseDownStartDay = getCursorOffsetInDaysFromLeft(renderInfo, ev);
- // If this wp is a parent element, changing it is not allowed.
+ // If this wp is a parent element, changing it is not allowed
+ // if it is not on 'Manual scheduling' mode
// But adding a relation to it is.
- if (!renderInfo.workPackage.isLeaf && !renderInfo.viewParams.activeSelectionMode) {
+ if (!renderInfo.workPackage.isLeaf && !renderInfo.viewParams.activeSelectionMode && !renderInfo.workPackage.scheduleManually) {
return;
}
diff --git a/frontend/src/global_styles/content/work_packages/timelines/elements/_bar.sass b/frontend/src/global_styles/content/work_packages/timelines/elements/_bar.sass
index d82699c130b..8e1b5212dc9 100644
--- a/frontend/src/global_styles/content/work_packages/timelines/elements/_bar.sass
+++ b/frontend/src/global_styles/content/work_packages/timelines/elements/_bar.sass
@@ -26,7 +26,7 @@
max-width: 20%
height: 100%
- &:hover .timeline-element--bg:not(.-clamp-style)
+ &:hover .timeline-element--bg:not(.-readonly)
&~.leftHandle,
&~.rightHandle
background-color: rgba(1, 1, 1, 0.2)