Skip to content

[feat] 동아리 지원자 양식 복제 기능 추가#1020

Merged
seongwon030 merged 1 commit intodevelop/befrom
feature/#1019-duplicate-applicant-MOA-498
Jan 11, 2026
Merged

[feat] 동아리 지원자 양식 복제 기능 추가#1020
seongwon030 merged 1 commit intodevelop/befrom
feature/#1019-duplicate-applicant-MOA-498

Conversation

@lepitaaar
Copy link
Contributor

@lepitaaar lepitaaar commented Jan 11, 2026

#️⃣연관된 이슈

#1019

📝작업 내용

추가 엔드 포인트
POST /application/{applicationFormId}/duplicate
전달된 applicationFormId의 설명, 질문을 복사하여 새로운 동아리 지원서 양식을 만듭니다
이름은 무제로 지어집니다

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

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

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

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

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

🫡 참고사항

Summary by CodeRabbit

신규 기능

  • 클럽 지원서 양식 복제 기능 추가: 기존의 클럽 지원서 양식을 복제하여 새로운 지원서 형식을 빠르게 생성할 수 있습니다. 제목, 설명, 질문 항목 등을 포함하여 동일한 구조의 지원서를 효율적으로 만들 수 있습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@lepitaaar lepitaaar self-assigned this Jan 11, 2026
@lepitaaar lepitaaar added ✨ Feature 기능 개발 💾 BE Backend labels Jan 11, 2026
@vercel
Copy link

vercel bot commented Jan 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
moadong Ready Ready Preview, Comment Jan 11, 2026 8:35am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 11, 2026

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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

Walkthrough

이 PR은 동아리 지원서 양식을 복제하는 기능을 추가합니다. ClubApplyAdminController에 POST 엔드포인트를 신규 추가하고, ClubApplyAdminService에 복제 로직을 구현하여 기존 양식의 필드를 새로운 양식으로 복사합니다.

Changes

Cohort / File(s) 변경 요약
API 엔드포인트 추가
backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java
POST 엔드포인트 /application/{applicationFormId}/duplicate 추가. 인증된 사용자만 접근 가능하며, 서비스 메서드를 호출하여 지원서 양식 복제 수행
복제 로직 구현
backend/src/main/java/moadong/club/service/ClubApplyAdminService.java
duplicateClubApplicationForm() 메서드 추가. 기존 양식을 조회한 후 제목을 "무제"로 설정하고 설명, 양식 모드, 질문, 외부 지원 URL 등의 필드를 복사하여 새로운 양식을 생성 및 저장

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

Suggested labels

📬 API

Suggested reviewers

  • Zepelown
  • PororoAndFriends
  • yw6938
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 추가된 기능을 명확하게 설명하며, 코드 변경사항과 완벽하게 일치합니다.
Linked Issues check ✅ Passed PR의 코드 변경사항이 MOA-498 이슈의 요구사항을 충족합니다: API 엔드포인트 제작 및 동아리 지원서 복제 기능 구현 완료.
Out of Scope Changes check ✅ Passed 모든 코드 변경사항이 연관 이슈 MOA-498의 범위 내에 있으며, 범위를 벗어난 수정사항은 없습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

@github-actions
Copy link

Test Results

75 tests   72 ✅  17s ⏱️
14 suites   3 💤
14 files     0 ❌

Results for commit cb36977.

Copy link
Contributor

@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: 1

🤖 Fix all issues with AI agents
In @backend/src/main/java/moadong/club/service/ClubApplyAdminService.java:
- Around line 132-147: The duplicateClubApplicationForm method currently builds
a new ClubApplicationForm without copying semesterYear and semesterTerm, so the
@Builder.Default uses current date; update the builder call in
duplicateClubApplicationForm to explicitly set
.semesterYear(oldApplicationForm.getSemesterYear()) and
.semesterTerm(oldApplicationForm.getSemesterTerm()) (alongside the already
copied fields) before saving so the cloned form preserves the original semester
info.
🧹 Nitpick comments (1)
backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java (1)

83-91: 복제된 양식의 ID를 반환하는 것을 고려해보세요.

엔드포인트 구현이 적절하며 보안 설정과 API 문서화가 잘 되어 있습니다.

다만, 복제 후 생성된 새 양식의 ID를 반환하면 클라이언트가 바로 해당 양식으로 이동하거나 추가 작업을 수행할 수 있어 사용자 경험이 개선됩니다.

♻️ 개선 제안

서비스 레이어 수정:

 @Transactional
-public void duplicateClubApplicationForm(String applicationFormId, CustomUserDetails user) {
+public String duplicateClubApplicationForm(String applicationFormId, CustomUserDetails user) {
     ClubApplicationForm oldApplicationForm = clubApplicationFormsRepository.findByClubIdAndId(user.getClubId(), applicationFormId)
             .orElseThrow(() -> new RestApiException(ErrorCode.APPLICATION_NOT_FOUND));

     ClubApplicationForm newApplicationForm = ClubApplicationForm.builder()
             .title("무제")
             .clubId(oldApplicationForm.getClubId())
             .description(oldApplicationForm.getDescription())
             .formMode(oldApplicationForm.getFormMode())
             .questions(oldApplicationForm.getQuestions())
             .externalApplicationUrl(oldApplicationForm.getExternalApplicationUrl())
             .build();

-    clubApplicationFormsRepository.save(newApplicationForm);
+    ClubApplicationForm saved = clubApplicationFormsRepository.save(newApplicationForm);
+    return saved.getId();
 }

컨트롤러 수정:

 @PostMapping("/application/{applicationFormId}/duplicate")
 @Operation(summary = "클럽 지원서 양식 복제", description = "클럽의 지원서 양식을 복제합니다")
 @PreAuthorize("isAuthenticated()")
 @SecurityRequirement(name = "BearerAuth")
 public ResponseEntity<?> duplicateClubApplicationForm(@PathVariable String applicationFormId,
                                                       @CurrentUser CustomUserDetails user) {
-    clubApplyAdminService.duplicateClubApplicationForm(applicationFormId, user);
-    return Response.ok("success duplicate application");
+    String newFormId = clubApplyAdminService.duplicateClubApplicationForm(applicationFormId, user);
+    return Response.ok(Map.of("message", "success duplicate application", "applicationFormId", newFormId));
 }
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between bfa1fc3 and cb36977.

📒 Files selected for processing (2)
  • backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java
  • backend/src/main/java/moadong/club/service/ClubApplyAdminService.java
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: lepitaaar
Repo: Moadong/moadong 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.
Learnt from: seongwon030
Repo: Moadong/moadong PR: 195
File: frontend/src/pages/AdminPage/AdminPage.tsx:7-7
Timestamp: 2025-03-19T05:18:07.818Z
Learning: AdminPage.tsx에서 현재 하드코딩된 클럽 ID('67d2e3b9b15c136c6acbf20b')는 로그인 기능 구현 후 동적으로 가져오는 방식으로 수정될 예정입니다.
📚 Learning: 2025-05-19T05:45:52.957Z
Learnt from: lepitaaar
Repo: Moadong/moadong 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.

Applied to files:

  • backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java
  • backend/src/main/java/moadong/club/service/ClubApplyAdminService.java
📚 Learning: 2025-09-30T05:26:41.788Z
Learnt from: alsdddk
Repo: Moadong/moadong PR: 765
File: backend/src/main/java/moadong/club/service/ClubApplyService.java:431-435
Timestamp: 2025-09-30T05:26:41.788Z
Learning: In the Moadong codebase's club application feature (backend/src/main/java/moadong/club/), multiple ClubApplicationForm entities can have ACTIVE status for the same clubId, semesterYear, and semesterTerm simultaneously. There is no uniqueness constraint requiring only one ACTIVE form per semester.

Applied to files:

  • backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java
  • backend/src/main/java/moadong/club/service/ClubApplyAdminService.java
📚 Learning: 2025-08-25T14:43:52.320Z
Learnt from: lepitaaar
Repo: Moadong/moadong PR: 703
File: backend/src/main/java/moadong/club/controller/ClubApplyController.java:84-84
Timestamp: 2025-08-25T14:43:52.320Z
Learning: In the Moadong codebase, questionId and clubId are equivalent identifiers that represent the same entity. The ClubApplicationRepository.findAllByIdInAndQuestionId method correctly uses clubId as the questionId parameter for filtering club applications.

Applied to files:

  • backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java
  • backend/src/main/java/moadong/club/service/ClubApplyAdminService.java
🔇 Additional comments (1)
backend/src/main/java/moadong/club/service/ClubApplyAdminService.java (1)

7-8: LGTM!

import 구문 정리가 적절합니다. 해당 클래스들은 파일 내 다른 메서드에서 이미 사용 중입니다.

Copy link
Member

@seongwon030 seongwon030 left a comment

Choose a reason for hiding this comment

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

프론트엔드 기능을 위한 승인 ~~

@seongwon030 seongwon030 merged commit 7932434 into develop/be Jan 11, 2026
5 checks passed
@lepitaaar lepitaaar deleted the feature/#1019-duplicate-applicant-MOA-498 branch January 22, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💾 BE Backend ✨ Feature 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments