Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/projects/actions/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ export function updatePhase(projectId, phaseId, updatedProps, phaseIndex) {
const phaseStatusChanged = phase.status !== updatedProps.status
const productId = phase.products[0].id
const timeline = state.productsTimelines[productId] && state.productsTimelines[productId].timeline
const startDateChanged =updatedProps.startDate && updatedProps.startDate.diff(timeline.startDate)
const phaseStartDate = timeline ? timeline.startDate : phase.startDate
const startDateChanged = updatedProps.startDate ? updatedProps.startDate.diff(phaseStartDate) : null
const phaseActivated = phaseStatusChanged && updatedProps.status === PHASE_STATUS_ACTIVE
if (phaseActivated) {
updatedProps.startDate = moment().hours(0).minutes(0).seconds(0).milliseconds(0)
Expand Down