Skip to content

Commit d4bbef8

Browse files
author
vikasrohit
authored
Hotfix/post release 2.4.13.2 (#3191)
* [HOTFIX] [PROD] Filter skills ignore case of categories (#3186) * fix: filter skills inside SkillsQuestion component ignoring case of skill categories which come from skill API * improve fix to make sure it's not broken if data from skills API is not complete * Github issue#3189, Unable to activate a phase without explicitly setting start date to today's date — Calculate the end date as well when activating the phase
1 parent 84e4680 commit d4bbef8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/projects/actions/project.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@ export function updatePhase(projectId, phaseId, updatedProps, phaseIndex) {
342342
const startDateChanged = updatedProps.startDate ? updatedProps.startDate.diff(phaseStartDate) : null
343343
const phaseActivated = phaseStatusChanged && updatedProps.status === PHASE_STATUS_ACTIVE
344344
if (phaseActivated) {
345-
updatedProps.startDate = moment().hours(0).minutes(0).seconds(0).milliseconds(0)
345+
const duration = updatedProps.duration ? updatedProps.duration : phase.duration
346+
updatedProps.startDate = moment().utc().hours(0).minutes(0).seconds(0).milliseconds(0).toISOString()
347+
updatedProps.endDate = moment(updatedProps.startDate).add(duration - 1, 'days').toISOString()
346348
}
347349

348350
return dispatch({

0 commit comments

Comments
 (0)