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

refactor-be: 지원서 제출 시 응답 존재 유무 검증 추가 #556

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

github-actions[bot]
Copy link
Contributor

Original issue description

목적

지원자가 지원서를 제출할 때, 질문에 대한 응답이 존재하는지 검증을 추가한다.

작업 세부사항

  • 응답 존재 유무 검증 추가

참고 사항

아래의 별표줄 밑에 요구사항 ID만 작성해주세요. Prefix 금지!


VAL_ANS_RES_01

closes #555

@github-actions github-actions bot added backend 백엔드 refactor 기존 코드 수정 labels Aug 20, 2024
@github-actions github-actions bot added this to the 스프린트 3.0 milestone Aug 20, 2024
@HyungHoKim00 HyungHoKim00 marked this pull request as ready for review August 20, 2024 08:56
Copy link
Contributor Author

1724144221.731569

Copy link
Contributor Author

📌 Test Coverage Report

Overall Project 72.62%
Files changed 100% 🍏

File Coverage
AnswerService.java 100% 🍏
ReplyNotExistsException.java 100% 🍏

Copy link
Contributor

@xogns1514 xogns1514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@cutehumanS2 cutehumanS2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코멘트 확인 부탁드려요~

Comment on lines 25 to 27
if (replies.isEmpty()) {
throw new ReplyNotExistsException();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

모든 질문에 응답하지 않은 경우에만 예외를 던지는 것 맞나요?
ReplyNotExistsException의 MESSAGE("응답하지 않은 질문이 존재합니다.")만 보면,
질문 중 일부에 응답하지 않은 경우도 포함되는 것 같아요.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

질문 중 하나라도 응답하지 않는 경우 예외가 발생하도록 했는데, 필수 질문 중 하나라도 응답하지 않는 경우 예외가 발생하도록 수정해야겠네요.

Copy link
Member

@cutehumanS2 cutehumanS2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

방금 남긴 부분만 변경하시면 좋을 것 같습니다 ~

@@ -22,7 +22,7 @@ public class AnswerService {
@Transactional
public void saveAnswerReplies(AnswerCreateRequest answerCreateRequest, Question question, Applicant applicant) {
List<String> replies = answerCreateRequest.replies();
if (replies.isEmpty()) {
if (question.getRequired() && replies.isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question에 isRequired()를 만들 수 있을 것 같아요.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

primitive type으로 변경하면서 사라졌습니당

@HyungHoKim00 HyungHoKim00 merged commit 99e53e9 into be/develop Aug 21, 2024
11 checks passed
@HyungHoKim00 HyungHoKim00 deleted the be-555-VAL_ANS_RES_01 branch August 21, 2024 04:14
@HyungHoKim00 HyungHoKim00 restored the be-555-VAL_ANS_RES_01 branch August 21, 2024 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend 백엔드 refactor 기존 코드 수정
Projects
Status: 완료
Development

Successfully merging this pull request may close these issues.

3 participants