Timeline: WIP relations, correct display for work packages with missing start/due values

pull/4927/head
Roman Roelofsen 8 years ago
parent cc11183b54
commit c3c7e17aeb
  1. 4
      frontend/app/components/wp-table/timeline/cell-renderer/timeline-cell-renderer.ts

@ -230,6 +230,8 @@ export class TimelineCellRenderer {
const wp = renderInfo.workPackage;
let start = moment(wp.startDate as any);
start = _.isNaN(start.valueOf()) ? moment(wp.dueDate).clone() : start;
const offsetStart = start.diff(renderInfo.viewParams.dateDisplayStart, "days");
return calculatePositionValueForDayCountinPx(renderInfo.viewParams, offsetStart);
@ -240,6 +242,8 @@ export class TimelineCellRenderer {
let start = moment(wp.startDate as any);
let due = moment(wp.dueDate as any);
due = _.isNaN(due.valueOf()) ? start.clone() : due;
const offsetStart = start.diff(renderInfo.viewParams.dateDisplayStart, "days");
const duration = due.diff(start, "days") + 1;

Loading…
Cancel
Save