Migrate interview metrics from dedicated entity to JobApplication field#45
Merged
Merged
Conversation
Adds PATCH /api/v1/dashboard/interview-count endpoint and Update-Interview-Count MCP tool so users can correct the cumulative interview counter when the automatic detection misses transitions. https://claude.ai/code/session_015kfgrc2oHA881RT3bEYHZ6
Adds interview_count column to job_applications so each application tracks its own count. Dashboard interviewCount now sums across all applications. Removes the per-user UserInterviewMetrics path and the manual update endpoint/MCP tool (editing is now done via the application form). https://claude.ai/code/session_015kfgrc2oHA881RT3bEYHZ6
Qodana for JVM2 new problems were found
View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2025.3.2
with:
upload-result: trueContact Qodana teamContact us at qodana-support@jetbrains.com
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors the interview metrics tracking system by migrating from a dedicated
UserInterviewMetricsentity to a denormalizedinterviewCountfield on theJobApplicationentity. This simplifies the data model and improves query efficiency.Key Changes
UserInterviewMetricsdependency: Eliminated the separate metrics entity and its repository, reducing data model complexityinterviewCountfield toJobApplication: New integer column (default 0) to track interviews per applicationInterviewMetricsService:UserInterviewMetricsRepositorywithApplicationRepositoryrecordStatusTransition()to only createInterviewEventrecordsgetInterviewCount()to use newsumInterviewCountByUserId()queryfindOrCreateMetrics()helper methodinterviewCountfield toApplicationRequestDTO with@Min(0)validationinterviewCountfield toApplicationResponseDTOApplicationService.mapRequestToEntity()to handle the new fieldApplicationMapper: Maps the newinterviewCountfield to response DTOsV25__add_interview_count_to_job_applications.sqlto create the new columnImplementation Details
sumInterviewCountByUserId()query usesCOALESCEto safely handle null sumshttps://claude.ai/code/session_015kfgrc2oHA881RT3bEYHZ6