Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow candidate test plans to advance with override #832

Merged
merged 3 commits into from
Dec 11, 2023
Merged
Changes from 2 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
43 changes: 30 additions & 13 deletions client/components/DataManagement/DataManagementRow/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,14 @@ const DataManagementRow = ({
const recommendedPhaseTargetDate = new Date(
latestVersion.recommendedPhaseTargetDate
);
const candidatePhaseReachedDate = new Date(
latestVersion.candidatePhaseReachedAt
);
const daysInReview = checkTimeBetweenDates(
currentDate,
candidatePhaseReachedDate
);
const workingModeDaysToReview = 120;

let timeToTargetDate = 0;
if (currentDate > recommendedPhaseTargetDate) {
Expand All @@ -854,18 +862,8 @@ const DataManagementRow = ({
currentDate
);

const daysBetweenDates = checkTimeBetweenDates(
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));
isAdmin && issuesCount === 0;

let coveredReports = [];
latestVersion.testPlanReports.forEach(testPlanReport => {
Expand Down Expand Up @@ -914,7 +912,11 @@ const DataManagementRow = ({
testPlanVersionDataToInclude
);
},
coveredReports
coveredReports,
candidateDaysInReview: daysInReview,
candidateWorkingModeDaysToReview:
workingModeDaysToReview,
testPlanTitle: testPlan.title
});
}}
>
Expand Down Expand Up @@ -1050,7 +1052,6 @@ const DataManagementRow = ({
)}
</td>
</tr>

{showThemedModal && themedModal}
{showAdvanceModal && (
<BasicModal
Expand All @@ -1059,6 +1060,22 @@ const DataManagementRow = ({
title={`Advancing test plan, ${testPlan.title}, ${advanceModalData.version}`}
content={
<>
{advanceModalData.candidateWorkingModeDaysToReview -
advanceModalData.candidateDaysInReview >
0 ? (
<p>
Warning! the {testPlan.title} test plan has
been in candidate review for{' '}
{advanceModalData.candidateDaysInReview}{' '}
days, which is{' '}
{advanceModalData.candidateWorkingModeDaysToReview -
advanceModalData.candidateDaysInReview}{' '}
fewer days than recommended by the ARIA-AT
working mode. Confirm this action only if
impacted stakeholders have had sufficient
opportunity to provide consensus.
</p>
) : null}
This version will be updated to&nbsp;
<b>{advanceModalData.phase}</b>.&nbsp;
{advanceModalData.coveredReports?.length ? (
Expand Down
Loading