Feature/dashboard trivia ii#4266
Open
krharum wants to merge 12 commits into
Open
Conversation
…DashboardService med optimalisert SQL-spørring og JSON-parsing
…or å hente detaljert og summert feilstatus, samt oppdater DashboardController for nye endepunkter
…g oppdater tilJsonEllerTekst-metoden for bedre JSON-parsing #deploy-test-dolly-backend
…bedret håndtering av feilstatus, samt oppdatering av DTO-er for bedre databehandling
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends apps/dolly-backend with new dashboard APIs and supporting data access to expose (1) monthly overview periods and (2) detailed/summarized “feilstatus” derived from bestilling_progress, plus a small improvement to exception path logging.
Changes:
- Added new dashboard endpoints for feilstatus (summert/detaljert) and oversikt-perioder, backed by new repository queries and service logic.
- Introduced new DTO/projection types (
BestillingProgressDTO,DashboardOversiktDTO,OversiktFragment) to support mapping and response shaping. - Refined existing dashboard grouping logic to avoid NPE when mapping organisasjonsnummer, and improved exception logging to use the actual request path.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/dolly-backend/src/main/java/no/nav/dolly/service/DashboardService.java | Adds feilstatus/oversikt logic and new R2DBC query execution + mapping/grouping. |
| apps/dolly-backend/src/main/java/no/nav/dolly/provider/DashboardController.java | Exposes new dashboard endpoints for feilstatus and oversikt. |
| apps/dolly-backend/src/main/java/no/nav/dolly/repository/BestillingRepository.java | Adds query for monthly dashboard oversikt periods grouped by “NYBESTILLING/GJENOPPRETTING”. |
| apps/dolly-backend/src/main/java/no/nav/dolly/repository/BestillingProgressRepository.java | Adds query to discover status columns used for feilstatus filtering. |
| apps/dolly-backend/src/main/java/no/nav/dolly/provider/advice/HttpExceptionAdvice.java | Logs/returns request path from the actual request URI. |
| apps/dolly-backend/src/main/java/no/nav/dolly/domain/projection/OversiktFragment.java | New projection for monthly overview aggregation. |
| apps/dolly-backend/src/main/java/no/nav/dolly/domain/dto/DashboardOversiktDTO.java | New DTO for monthly overview response. |
| apps/dolly-backend/src/main/java/no/nav/dolly/domain/dto/BestillingProgressDTO.java | New DTO used for mapping bestilling_progress rows into JSON-friendly structures. |
| apps/dolly-backend/src/test/java/no/nav/dolly/service/DashboardServiceTest.java | Adds test coverage for oversikt and organisasjon grouping behavior. |
…ardService, samt oppdater DashboardOversiktDTO for oversiktsdata
…lify data handling #deploy-test-dolly-backend
#deploy-test-dolly-backend #deploy-dolly-backend
…stnorgeIdent field
…e in inntektsstubStatus field #deploy-test-dolly-backend #deploy-dolly-backend
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.
This pull request introduces several new DTOs and projections, adds new dashboard-related API endpoints, and implements supporting repository queries and service logic to provide detailed and summarized error status and overview data for the dashboard. Additionally, it improves exception logging and refines some existing grouping logic.
Dashboard API and Data Model Enhancements:
BestillingProgressDTO,DashboardOversiktDTO) and a projection (OversiktFragment) to represent progress and overview data for orders and dashboard statistics. [1] [2] [3]DashboardControllerto fetch detailed and summarized error statuses as well as available periods for dashboard overviews.Repository and Query Additions:
BestillingRepositoryandBestillingProgressRepositoryto provide available intervals and status column names for dashboard statistics and error reporting. [1] [2]Service Layer Updates:
DashboardServiceto support the new endpoints and queries, including logic to group and map data for the dashboard, and to use the new DTOs and projections. [1] [2]Exception Handling Improvements:
HttpExceptionAdviceto log and return the actual request path instead of a Spring attribute, making error messages clearer and more accurate. [1] [2]Minor Logic Refinements:
DashboardServiceto avoidNullPointerExceptionwhen mapping organization numbers.These changes collectively enhance the dashboard's ability to report on order progress, error statuses, and historical overviews, while improving maintainability and error transparency.