Skip to content

[Fix] 자소서 답변 저장 시 문항 수정사항 반영#131

Merged
whc9999 merged 1 commit into
devfrom
fix/update-question-content-with-answer
Jul 18, 2026
Merged

[Fix] 자소서 답변 저장 시 문항 수정사항 반영#131
whc9999 merged 1 commit into
devfrom
fix/update-question-content-with-answer

Conversation

@whc9999

@whc9999 whc9999 commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

✨ 어떤 이유로 PR를 하셨나요?

  • feature 병합
  • 버그 수정(아래에 issue #를 남겨주세요)
  • 코드 개선
  • 코드 수정
  • 배포
  • 기타(아래에 자세한 내용 기입해주세요)

📋 세부 내용 - 왜 해당 PR이 필요한지 작업 내용을 자세하게 설명해주세요

  • 답변 저장 요청에 문항 내용 필드를 추가
  • 저장된 문항의 내용과 답변을 함께 수정하도록 로직 변경
  • 문항 답변 저장 API 설명을 현재 동작에 맞게 수정
  • 문항 내용 수정 반영 여부를 검증하는 테스트 추가

📸 작업 화면 스크린샷

⚠️ PR하기 전에 확인해주세요

  • 로컬테스트를 진행하셨나요?
  • 머지할 브랜치를 확인하셨나요?
  • 관련 label을 선택하셨나요?

🚨 관련 이슈 번호 [ ]

Summary by CodeRabbit

  • Enhancements

    • Saving an answer now also updates the associated question content.
    • Question content is trimmed before being saved.
    • Empty question content is rejected with a validation message.
  • Documentation

    • Updated API documentation to clarify that both question content and answers can be saved or updated.

- 답변 저장 요청에 문항 내용 필드를 추가
- 저장된 문항의 내용과 답변을 함께 수정하도록 로직 변경
- 문항 답변 저장 API 설명을 현재 동작에 맞게 수정
- 문항 내용 수정 반영 여부를 검증하는 테스트 추가
@whc9999 whc9999 self-assigned this Jul 18, 2026
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ca434fb3-9a92-4a81-9c3f-2a702e248320

📥 Commits

Reviewing files that changed from the base of the PR and between 8de2b50 and b701853.

📒 Files selected for processing (5)
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/controller/QuestionController.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/dto/request/QuestionAnswerSaveRequest.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/entity/Question.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/service/QuestionService.java
  • src/test/java/com/jobdri/jobdri_api/domain/analysis/service/QuestionServiceTest.java

📝 Walkthrough

Walkthrough

saveAnswers now validates non-blank question content and persists updated question content with normalized answers. The Question entity exposes a combined update method, endpoint documentation reflects the behavior, and service tests verify the updated request and persistence flow.

Changes

Question answer saving

Layer / File(s) Summary
Request validation and entity update contract
src/main/java/com/jobdri/jobdri_api/domain/analysis/dto/request/QuestionAnswerSaveRequest.java, src/main/java/com/jobdri/jobdri_api/domain/analysis/entity/Question.java
AnswerItem.content rejects blank values, and Question can update content and answer together.
Combined content and answer persistence
src/main/java/com/jobdri/jobdri_api/domain/analysis/service/QuestionService.java, src/main/java/com/jobdri/jobdri_api/domain/analysis/controller/QuestionController.java
saveAnswers stores trimmed question content with the normalized answer, and API documentation describes both updates.
Updated saveAnswers test coverage
src/test/java/com/jobdri/jobdri_api/domain/analysis/service/QuestionServiceTest.java
Tests now provide question content and verify returned and persisted content alongside answers. Existing exception expectations remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: shinae1023

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: updating question content while saving essay answers.
Description check ✅ Passed The description follows the template and covers purpose, details, and pre-checks, with only screenshots and issue number left empty.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/update-question-content-with-answer

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@whc9999
whc9999 merged commit 6778964 into dev Jul 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant