From 918acdd680a1dcb34d1970379acedb9fba6e6933 Mon Sep 17 00:00:00 2001 From: Alexander Flenniken Date: Mon, 11 Dec 2023 17:20:55 -0500 Subject: [PATCH] Allow candidate test plans to advance with override (#832) * Allow candidate test plans to advance * Implement PR feedback --- .../DataManagementRow/index.jsx | 51 +++++++++++-------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/client/components/DataManagement/DataManagementRow/index.jsx b/client/components/DataManagement/DataManagementRow/index.jsx index ee0d13d91..c38b3f318 100644 --- a/client/components/DataManagement/DataManagementRow/index.jsx +++ b/client/components/DataManagement/DataManagementRow/index.jsx @@ -850,6 +850,14 @@ const DataManagementRow = ({ const recommendedPhaseTargetDate = new Date( latestVersion.recommendedPhaseTargetDate ); + const candidatePhaseReachedDate = new Date( + latestVersion.candidatePhaseReachedAt + ); + const daysInReview = checkDaysBetweenDates( + currentDate, + candidatePhaseReachedDate + ); + const workingModeDaysToReview = 120; let timeToTargetDate = 0; if (currentDate > recommendedPhaseTargetDate) { @@ -865,19 +873,6 @@ const DataManagementRow = ({ currentDate ); - const daysBetweenDates = checkDaysBetweenDates( - currentDate, - latestVersion.candidatePhaseReachedAt - ); - const DAYS_TO_PROVIDE_FEEDBACK = 120; - const shouldShowAdvanceButton = - isAdmin && - completedRequiredReports(latestVersion) && - issuesCount === 0 && - (recommendedTestPlanVersions.length || - (!recommendedTestPlanVersions.length && - daysBetweenDates > DAYS_TO_PROVIDE_FEEDBACK)); - let coveredReports = []; latestVersion.testPlanReports.forEach(testPlanReport => { const markedFinalAt = testPlanReport.markedFinalAt; @@ -895,10 +890,7 @@ const DataManagementRow = ({ // TODO: Remove this testFormatVersion check when #745 is implemented const linkHref = getLinkHref(latestVersion); return ( - + {latestVersion.versionString} - {shouldShowAdvanceButton && ( + {isAdmin && (