Skip to content

Commit 3820011

Browse files
committed
TD-5611-Modified SQL query to hide retired self-assessment role profiles
1 parent b9e2b5b commit 3820011

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ FROM CandidateAssessments AS CA
796796
WHERE (DelegateUserID = @delegateUserId) AND (RemovedDate IS NULL)
797797
AND (CompletedDate IS NULL)))
798798
AND ((rp.SupervisorSelfAssessmentReview = 1) OR (rp.SupervisorResultsReview = 1))
799-
AND (ISNULL(@categoryId, 0) = 0 OR rp.CategoryID = @categoryId)", new { delegateUserId, centreId, categoryId }
799+
AND (ISNULL(@categoryId, 0) = 0 OR rp.CategoryID = @categoryId) AND
800+
((CAST(rp.RetirementDate AS DATE) >= CAST(GETUTCDATE() AS DATE)) OR rp.RetirementDate IS NULL)", new { delegateUserId, centreId, categoryId }
800801
);
801802
}
802803

0 commit comments

Comments
 (0)