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

fix: 과제 미제출과 제출전을 구별하도록 수정 #721

Merged

Conversation

Sangwook02
Copy link
Member

@Sangwook02 Sangwook02 commented Aug 30, 2024

🌱 관련 이슈

📌 작업 내용 및 특이사항

  • assignmentHistory가 null인 경우(제출 전), 과제 제출 상태와 실패여부에 대한 필드를 null로 반환하도록 수정했습니다.

📝 참고사항

📚 기타

Summary by CodeRabbit

  • 새로운 기능

    • 과제 제출 상태를 보다 유연하게 처리할 수 있도록 응답 구조를 개선했습니다.
    • 과제 제출 전 상태를 보다 명확하게 표현하기 위해 메서드 이름을 변경했습니다.
  • 버그 수정

    • 제출되지 않은 과제를 실패로 간주하지 않고, 정의되지 않은 상태로 처리하도록 로직을 수정했습니다.

@Sangwook02 Sangwook02 self-assigned this Aug 30, 2024
@Sangwook02 Sangwook02 requested a review from a team as a code owner August 30, 2024 07:34
Copy link

coderabbitai bot commented Aug 30, 2024

Walkthrough

변경 사항은 AssignmentHistoryStatusResponseAssignmentSubmittableDto 클래스의 메서드 로직 및 명명 규칙에 대한 수정으로 구성됩니다. 이 변경은 과제 제출 상태를 보다 유연하게 처리할 수 있도록 하며, 제출되지 않은 상태를 정의하는 방식을 개선합니다.

Changes

파일 경로 변경 요약
src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.java
src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentSubmittableDto.java
AssignmentHistoryStatusResponseof 메서드에서 SubmissionFailureType.NOT_SUBMITTEDnull로 변경.
AssignmentSubmittableDtonotSubmittedAssignment 메서드를 beforeAssignmentSubmit으로 이름 변경 및 반환값을 null로 수정.

Assessment against linked issues

Objective Addressed Explanation
과제 제출전과 미제출을 구분할 수 있도록 수정 (#720)

🐇 변화의 기쁨을 노래해요,
제출 전과 미제출, 이제는 분명해요!
명칭이 바뀌고, 상태가 변해,
더 명확한 길로 나아가요!
귀여운 과제, 이제는 걱정 없어요! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a3b3312 and f8e2518.

Files selected for processing (2)
  • src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.java (2 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentSubmittableDto.java (2 hunks)
Additional comments not posted (2)
src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentHistoryStatusResponse.java (1)

35-35: 과제 제출 상태 처리 로직 수정 승인

과제 제출이 없는 경우, 과제 정보만 반환하도록 수정한 부분은 명확하게 과제 미제출과 제출 전 상태를 구분합니다. 이 변경이 다른 시스템 부분에 영향을 주지 않는지 확인하는 것이 좋겠습니다.

다음 스크립트를 실행하여 하류 처리가 올바르게 이루어지는지 확인하세요:

src/main/java/com/gdschongik/gdsc/domain/study/dto/response/AssignmentSubmittableDto.java (1)

51-61: 메서드 명칭 및 반환 값 변경 승인

beforeAssignmentSubmit 메서드의 명칭 변경과 반환 값으로 null을 사용하는 것은 과제 제출 전 상태를 더 명확하게 표현합니다. 이 변경이 애플리케이션 로직에 영향을 주지 않는지 확인하는 것이 좋겠습니다.

다음 스크립트를 실행하여 애플리케이션 로직이 변경된 반환 값에 올바르게 대응하는지 확인하세요:

@Sangwook02 Sangwook02 added the 🐛 bug/error 버그 및 에러 픽스 label Aug 30, 2024
Copy link
Member

@AlmondBreez3 AlmondBreez3 left a comment

Choose a reason for hiding this comment

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

lgtm

null도 괜찮은데 enum추가해서 더 명확히 하면 더 괜찮을 것 같은데 이건 추후에 리팩토링할 때 하면 될것같기도 하네요

Copy link
Contributor

@seulgi99 seulgi99 left a comment

Choose a reason for hiding this comment

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

LGTM

@Sangwook02
Copy link
Member Author

lgtm

null도 괜찮은데 enum추가해서 더 명확히 하면 더 괜찮을 것 같은데 이건 추후에 리팩토링할 때 하면 될것같기도 하네요

실패여부는 null이 맞는 것 같은데 제출 상태는 다른 enum 값으로 넣어도 좋을 것 같네요.
우선 머지하겠습니다~

@Sangwook02 Sangwook02 merged commit e918170 into develop Aug 30, 2024
1 check passed
@Sangwook02 Sangwook02 deleted the fix/720-distinguish-not-submitted-and-before-submit branch August 30, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug/error 버그 및 에러 픽스
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 과제 제출전과 미제출을 구분할 수 있도록 수정
3 participants