Skip to content

Commit 1f5a7ed

Browse files
committed
2024-10-21 - feedback - external reviewer - server-side
1 parent a68340d commit 1f5a7ed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public interface FeedbackRequestRepository extends CrudRepository<FeedbackReques
3131
"AND (:reviewPeriodId IS NULL OR review_period_id = :reviewPeriodId) " +
3232
"AND (:templateId IS NULL OR template_id = :templateId) " +
3333
"AND (requestee_id = ANY(:requesteeIds)) " +
34-
"AND (:externalRecipientId IS NULL OR externalRecipientId = :externalRecipientId) "
34+
"AND (:externalRecipientId IS NULL OR external_recipient_id = :externalRecipientId) "
3535
, nativeQuery = true)
3636
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);
3737

@@ -43,7 +43,7 @@ public interface FeedbackRequestRepository extends CrudRepository<FeedbackReques
4343
"AND (CAST(:oldestDate as date) IS NULL OR send_date >= :oldestDate) " +
4444
"AND (:reviewPeriodId IS NULL OR review_period_id = :reviewPeriodId) " +
4545
"AND (:templateId IS NULL OR template_id = :templateId) " +
46-
"AND (:externalRecipientId IS NULL OR externalRecipientId = :externalRecipientId) "
46+
"AND (:externalRecipientId IS NULL OR external_recipient_id = :externalRecipientId) "
4747
, nativeQuery = true)
4848
List<FeedbackRequest> findByValues(@Nullable String creatorId, @Nullable String requesteeId, @Nullable String recipientId, @Nullable LocalDate oldestDate, @Nullable String reviewPeriodId, @Nullable String templateId, @Nullable String externalRecipientId);
4949

server/src/test/java/com/objectcomputing/checkins/services/feedback_request/FeedbackRequestControllerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ void testCreateFeedbackRequestWithNoRecipients() {
394394
client.toBlocking().exchange(request, Map.class));
395395

396396
JsonNode body = responseException.getResponse().getBody(JsonNode.class).orElse(null);
397-
String error = Objects.requireNonNull(body).get("_embedded").get("errors").get(0).get("message").asText();
397+
String error = Objects.requireNonNull(body).get("message").asText();
398398
assertEquals(HttpStatus.BAD_REQUEST, responseException.getStatus());
399-
assertEquals("requestBody.recipientId: must not be null", error);
399+
assertEquals("Cannot save feedback request without recipient/external-recipient ID", error);
400400
}
401401

402402
@Test

0 commit comments

Comments
 (0)