Skip to content

Commit f8cee94

Browse files
committed
2024-10-22 - feedback - external reviewer - server-side
1 parent 72f24b2 commit f8cee94

File tree

4 files changed

+400
-42
lines changed

4 files changed

+400
-42
lines changed

server/src/main/java/com/objectcomputing/checkins/services/feedback_request/FeedbackRequestRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface FeedbackRequestRepository extends CrudRepository<FeedbackReques
3333
"AND (requestee_id = ANY(:requesteeIds)) " +
3434
"AND (:externalRecipientId IS NULL OR external_recipient_id = :externalRecipientId) "
3535
, nativeQuery = true)
36-
List<FeedbackRequest> findByValues(@Nullable String creatorId, @Nullable String recipientId, @Nullable LocalDate oldestDate, @Nullable String reviewPeriodId, @Nullable String templateId, @TypeDef(type = DataType.STRING_ARRAY) List<String> requesteeIds, @Nullable String externalRecipientId);
36+
List<FeedbackRequest> findByValuesWithRequesteeIds(@Nullable String creatorId, @Nullable String recipientId, @Nullable LocalDate oldestDate, @Nullable String reviewPeriodId, @Nullable String templateId, @Nullable String externalRecipientId, @TypeDef(type = DataType.STRING_ARRAY) List<String> requesteeIds);
3737

3838
@Query(value = "SELECT * " +
3939
"FROM feedback_requests " +

server/src/main/java/com/objectcomputing/checkins/services/feedback_request/FeedbackRequestServicesImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ public List<FeedbackRequest> findByValues(UUID creatorId, UUID requesteeId, UUID
349349
List<FeedbackRequest> feedbackReqList = new ArrayList<>();
350350
if (requesteeIds != null && !requesteeIds.isEmpty()) {
351351
LOG.debug("Finding feedback requests for {} requesteeIds.", requesteeIds.size());
352-
feedbackReqList.addAll(feedbackReqRepository.findByValues(Util.nullSafeUUIDToString(creatorId), Util.nullSafeUUIDToString(recipientId), oldestDate, Util.nullSafeUUIDToString(reviewPeriodId), Util.nullSafeUUIDToString(templateId), Util.nullSafeUUIDListToStringList(requesteeIds), Util.nullSafeUUIDToString(externalRecipientId)));
352+
feedbackReqList.addAll(feedbackReqRepository.findByValuesWithRequesteeIds(Util.nullSafeUUIDToString(creatorId), Util.nullSafeUUIDToString(recipientId), oldestDate, Util.nullSafeUUIDToString(reviewPeriodId), Util.nullSafeUUIDToString(templateId), Util.nullSafeUUIDToString(externalRecipientId), Util.nullSafeUUIDListToStringList(requesteeIds)));
353353
} else {
354354
LOG.debug("Finding feedback requests one or fewer requesteeIds: {}", requesteeId);
355355
feedbackReqList.addAll(feedbackReqRepository.findByValues(Util.nullSafeUUIDToString(creatorId), Util.nullSafeUUIDToString(requesteeId), Util.nullSafeUUIDToString(recipientId), oldestDate, Util.nullSafeUUIDToString(reviewPeriodId), Util.nullSafeUUIDToString(templateId), Util.nullSafeUUIDToString(externalRecipientId)));

0 commit comments

Comments
 (0)