Skip to content

Commit

Permalink
Fix PnP progress step comparison with project date range (#3337)
Browse files Browse the repository at this point in the history
Co-authored-by: Carson Full <[email protected]>
  • Loading branch information
atGit2021 and CarsonF authored Dec 12, 2024
1 parent 993aa9d commit 32e2922
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/pnp/isProgressCompletedOutsideProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export const isProgressCompletedOutsideProject = (
if (!completeDate) {
return false;
}
if (pnp.planning.projectDateRange.contains(completeDate)) {
// Steps completion dates smallest unit is quarters, so expand project range to that.
const projectTimeframe =
pnp.planning.projectDateRange.expandToFull('quarter');
if (projectTimeframe.contains(completeDate)) {
return false;
}

Expand All @@ -25,7 +28,7 @@ export const isProgressCompletedOutsideProject = (
completeDate,
)}`;

if (pnp.planning.projectDateRange.isAfter(completeDate)) {
if (projectTimeframe.isAfter(completeDate)) {
result.addProblem({
severity: 'Notice',
groups: [
Expand Down

0 comments on commit 32e2922

Please sign in to comment.