Skip to content

Comments

[fix] 동아리 검색 API #586

Merged
lepitaaar merged 2 commits intodevelop/befrom
fix/club-search-issue
Jul 26, 2025
Merged

[fix] 동아리 검색 API #586
lepitaaar merged 2 commits intodevelop/befrom
fix/club-search-issue

Conversation

@lepitaaar
Copy link
Contributor

@lepitaaar lepitaaar commented Jul 26, 2025

#️⃣연관된 이슈

#585

📝작업 내용

정렬 순서 변경 -> 마감과 모집예정 우선순위를 변경했습니다.
OPEN 조건으로 검색시 UPCOMING 상태도 포함하게 변경

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

  • 버그 수정
    • 모집 상태가 "OPEN"일 때 "ALWAYS", "OPEN"뿐만 아니라 "UPCOMING" 상태의 클럽도 검색 결과에 포함되도록 개선되었습니다.
  • 기타
    • 모집 상태 우선순위가 일부 조정되었습니다.
    • 클럽 검색 결과의 정렬 순서가 일부 변경되었습니다.

@lepitaaar lepitaaar self-assigned this Jul 26, 2025
@lepitaaar lepitaaar added 🐞 Bug Something isn't working 📬 API 서버 API 통신 작업 💾 BE Backend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정 labels Jul 26, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 26, 2025

"""

Walkthrough

이 변경사항은 ClubRecruitmentStatus enum의 CLOSED와 UPCOMING의 우선순위 값을 서로 교체하고, ClubSearchRepository의 getMatchedCriteria 메서드에서 "OPEN" 상태 검색 시 "UPCOMING" 상태도 포함하도록 필터링 로직을 확장하며, 관련 테스트의 클럽 정렬 순서 검증을 수정합니다.

Changes

파일/경로 변경 요약
.../enums/ClubRecruitmentStatus.java CLOSED와 UPCOMING의 enum 우선순위(priority) 값 서로 교체
.../repository/ClubSearchRepository.java getMatchedCriteria에서 "OPEN" 검색 시 "UPCOMING" 상태도 포함하도록 필터링 로직 수정
.../service/ClubSearchServiceTest.java searchClubsByKeyword 테스트에서 클럽 정렬 순서 검증 변경

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ClubSearchRepository
    participant ClubRecruitmentStatus

    User->>ClubSearchRepository: getMatchedCriteria("OPEN")
    ClubSearchRepository->>ClubRecruitmentStatus: 조회 가능한 상태 목록 확인 (ALWAYS, OPEN, UPCOMING)
    ClubRecruitmentStatus-->>ClubSearchRepository: 상태 목록 반환
    ClubSearchRepository-->>User: 필터링된 클럽 목록 반환
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8분

Possibly related PRs

Suggested reviewers

  • Zepelown
  • PororoAndFriends
    """

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0098043 and ed84edb.

📒 Files selected for processing (1)
  • backend/src/test/java/moadong/club/service/ClubSearchServiceTest.java (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: seongwon030
PR: Moadong/moadong#195
File: frontend/src/pages/AdminPage/AdminPage.tsx:7-7
Timestamp: 2025-03-19T05:18:07.818Z
Learning: AdminPage.tsx에서 현재 하드코딩된 클럽 ID('67d2e3b9b15c136c6acbf20b')는 로그인 기능 구현 후 동적으로 가져오는 방식으로 수정될 예정입니다.
Learnt from: Due-IT
PR: Moadong/moadong#329
File: backend/src/main/java/moadong/club/controller/ClubSearchController.java:0-0
Timestamp: 2025-05-01T08:32:09.398Z
Learning: ClubSearchController의 searchClubsByKeyword 메서드와 ClubSearchService의 searchClubsByKeyword 메서드 사이에 파라미터 순서 일치가 중요하다. 현재 컨트롤러의 매개변수 순서는 'keyword, recruitmentStatus, category, division'인 반면, 서비스 메서드의 순서는 'keyword, recruitmentStatus, division, category'이다. 컨트롤러에서 서비스 호출 시 'keyword, recruitmentStatus, division, category' 순서로 전달하면 category와 division 값이 바뀌어 검색 결과가 잘못될 수 있다.
Learnt from: seongwon030
PR: Moadong/moadong#548
File: frontend/src/pages/ClubDetailPage/ClubDetailPage.tsx:17-57
Timestamp: 2025-07-19T05:05:10.196Z
Learning: ClubDetailPage.tsx에서 notJoinedClubNames 배열의 하드코딩은 의도적인 설계 결정입니다. 개발자가 명시적으로 하드코딩을 선택했으므로 이에 대한 리팩토링 제안을 하지 않아야 합니다.
Learnt from: lepitaaar
PR: Moadong/moadong#406
File: backend/src/main/java/moadong/club/service/ClubApplyService.java:34-38
Timestamp: 2025-05-19T05:45:52.957Z
Learning: The code duplication between createClubApplication and editClubApplication methods in ClubApplyService.java is acknowledged but will be addressed in a future refactoring, as per the developer's plan.
backend/src/test/java/moadong/club/service/ClubSearchServiceTest.java (2)

Learnt from: Due-IT
PR: #329
File: backend/src/main/java/moadong/club/controller/ClubSearchController.java:0-0
Timestamp: 2025-05-01T08:32:09.398Z
Learning: ClubSearchController의 searchClubsByKeyword 메서드와 ClubSearchService의 searchClubsByKeyword 메서드 사이에 파라미터 순서 일치가 중요하다. 현재 컨트롤러의 매개변수 순서는 'keyword, recruitmentStatus, category, division'인 반면, 서비스 메서드의 순서는 'keyword, recruitmentStatus, division, category'이다. 컨트롤러에서 서비스 호출 시 'keyword, recruitmentStatus, division, category' 순서로 전달하면 category와 division 값이 바뀌어 검색 결과가 잘못될 수 있다.

Learnt from: lepitaaar
PR: #406
File: backend/src/main/java/moadong/club/service/ClubApplyService.java:34-38
Timestamp: 2025-05-19T05:45:52.957Z
Learning: The code duplication between createClubApplication and editClubApplication methods in ClubApplyService.java is acknowledged but will be addressed in a future refactoring, as per the developer's plan.

🔇 Additional comments (1)
backend/src/test/java/moadong/club/service/ClubSearchServiceTest.java (1)

54-54: 테스트 정렬 순서 업데이트가 올바릅니다.

UPCOMING 상태의 우선순위가 CLOSED보다 높아진 것을 반영하여 테스트 어설션이 올바르게 수정되었습니다. 이는 PR 목표인 "곧 모집할 예정인 동아리를 우선적으로 정렬"하는 요구사항과 일치합니다.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/club-search-issue

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
🪧 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this 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.

@github-actions
Copy link

github-actions bot commented Jul 26, 2025

Test Results

75 tests   75 ✅  2s ⏱️
12 suites   0 💤
12 files     0 ❌

Results for commit ed84edb.

♻️ This comment has been updated with latest results.

@lepitaaar lepitaaar merged commit 0c78889 into develop/be Jul 26, 2025
2 of 3 checks passed
@lepitaaar lepitaaar deleted the fix/club-search-issue branch September 16, 2025 11:42
@lepitaaar lepitaaar restored the fix/club-search-issue branch September 16, 2025 11:42
@lepitaaar lepitaaar deleted the fix/club-search-issue branch October 21, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📬 API 서버 API 통신 작업 💾 BE Backend 🐞 Bug Something isn't working 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant