Skip to content

fix: 이벤트 수동 오픈 로직에 티켓팅 시간 업데이트도 추가 - #46

Merged
d6nggyun merged 1 commit into
mainfrom
dev
Apr 12, 2026
Merged

d6nggyun merged 1 commit into
mainfrom
dev

Conversation

@d6nggyun

@d6nggyun d6nggyun commented Apr 11, 2026 •

Copy link
Copy Markdown
Collaborator

#️⃣ 연관된 이슈

📝 작업 내용

이벤트 수동 오픈 로직에 티켓팅 시간 업데이트도 추가

스크린샷 (선택)

💬 리뷰 요구사항(선택)

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • 이벤트 활성화 시 이벤트 시간이 자동으로 최신 시간으로 업데이트되도록 개선했습니다.

@d6nggyun d6nggyun self-assigned this Apr 11, 2026
@d6nggyun d6nggyun added the 🐞 BugFix 버그 발생 또는 해결 label Apr 11, 2026
@coderabbitai

coderabbitai Bot commented Apr 11, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Event 엔티티에 새로운 updateEventTime() 메서드가 추가되었고, EventAdminService의 openEvent() 메서드에서 이벤트 상태를 ACTIVE로 변경할 때 현재 시간으로 이벤트 시간을 업데이트하도록 수정되었습니다.

Changes

Cohort / File(s) Summary
Event Entity
codin-ticketing-api/src/main/java/inu/codin/codinticketingapi/domain/admin/entity/Event.java
새로운 updateEventTime(LocalDateTime eventTime) 메서드가 추가되어 이벤트의 시간 필드를 업데이트할 수 있도록 함.
Event Admin Service
codin-ticketing-api/src/main/java/inu/codin/codinticketingapi/domain/admin/service/EventAdminService.java
openEvent() 메서드에서 상태를 ACTIVE로 변경한 후 새로운 updateEventTime() 메서드를 호출하여 현재 시간으로 이벤트 시간을 업데이트함.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 시간을 기록하는 마법의 순간,
이벤트가 활성화될 때 시계가 째깍째깍,
새로운 메서드로 시간은 이제 깔끔하게 ✨
간단한 변화이지만, 소중한 업데이트!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Description check ❓ Inconclusive PR 설명이 필수 섹션 중 '연관된 이슈'와 '리뷰 요구사항' 항목이 비어있으며, '작업 내용'이 매우 간략한 수준으로만 작성되어 있습니다. 연관된 이슈 번호를 추가하고, '작업 내용' 섹션에 변경 사항의 구체적인 목적과 영향을 더 상세히 설명해 주시기 바랍니다.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용을 명확하게 요약하고 있으며, 이벤트 수동 오픈 로직에 티켓팅 시간 업데이트를 추가하는 것을 구체적으로 설명합니다.

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

✨ 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 dev

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@codin-ticketing-api/src/main/java/inu/codin/codinticketingapi/domain/admin/entity/Event.java`:
- Around line 167-169: updateEventTime 메서드가 `@Column`(nullable = false)인 eventTime
필드에 null을 바로 대입해 검증을 flush 시점까지 지연하므로, updateEventTime(LocalDateTime eventTime)
내부에서 즉시 null 방어를 추가해 null 입력 시 IllegalArgumentException(또는
NullPointerException)으로 즉시 예외를 던지도록 변경하세요; 대상은 메서드 updateEventTime과 필드
eventTime입니다.

In
`@codin-ticketing-api/src/main/java/inu/codin/codinticketingapi/domain/admin/service/EventAdminService.java`:
- Around line 224-226: Before changing the event to ACTIVE and updating times,
validate that the event's end time is in the future: check
findEvent.getEventEndTime() (or the domain property representing event end)
against LocalDateTime.now() and if eventEndTime.isBefore(now) ||
eventEndTime.isEqual(now) throw a validation exception (e.g.
IllegalStateException or a domain-specific exception) to prevent reopening
expired events; only when the check passes call
findEvent.updateStatus(EventStatus.ACTIVE),
findEvent.updateEventTime(LocalDateTime.now()), and then
eventStatusScheduler.deleteOpenEventScheduler(eventId). Ensure the guard is
added in the method performing these calls (the block that currently calls
findEvent.updateStatus/updateEventTime and
eventStatusScheduler.deleteOpenEventScheduler).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3df2f4d0-4a06-4055-936d-15cdc0142705

📥 Commits

Reviewing files that changed from the base of the PR and between 64b3eb9 and ceadb9c.

📒 Files selected for processing (2)
  • codin-ticketing-api/src/main/java/inu/codin/codinticketingapi/domain/admin/entity/Event.java
  • codin-ticketing-api/src/main/java/inu/codin/codinticketingapi/domain/admin/service/EventAdminService.java

@d6nggyun
d6nggyun merged commit 5a29f40 into main Apr 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix 버그 발생 또는 해결

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant