Skip to content

Feature/dashboard trivia ii#4266

Open
krharum wants to merge 12 commits into
masterfrom
feature/dashboard-trivia-II
Open

Feature/dashboard trivia ii#4266
krharum wants to merge 12 commits into
masterfrom
feature/dashboard-trivia-II

Conversation

@krharum

@krharum krharum commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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:

  • Added new DTOs (BestillingProgressDTO, DashboardOversiktDTO) and a projection (OversiktFragment) to represent progress and overview data for orders and dashboard statistics. [1] [2] [3]
  • Introduced new dashboard endpoints in DashboardController to fetch detailed and summarized error statuses as well as available periods for dashboard overviews.

Repository and Query Additions:

  • Added new queries in BestillingRepository and BestillingProgressRepository to provide available intervals and status column names for dashboard statistics and error reporting. [1] [2]

Service Layer Updates:

  • Updated DashboardService to 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:

  • Improved exception logging in HttpExceptionAdvice to log and return the actual request path instead of a Spring attribute, making error messages clearer and more accurate. [1] [2]

Minor Logic Refinements:

  • Updated grouping logic in DashboardService to avoid NullPointerException when 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.

krharum and others added 7 commits June 16, 2026 07:27
…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
@krharum krharum marked this pull request as ready for review June 19, 2026 07:50
@krharum krharum requested a review from a team as a code owner June 19, 2026 07:50
Copilot AI review requested due to automatic review settings June 19, 2026 07:50

Copilot AI 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.

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.

Comment thread apps/dolly-backend/src/main/java/no/nav/dolly/service/DashboardService.java Outdated
Comment thread apps/dolly-backend/src/main/java/no/nav/dolly/service/DashboardService.java Outdated
Comment thread apps/dolly-backend/src/main/java/no/nav/dolly/service/DashboardService.java Outdated
Comment thread apps/dolly-backend/src/main/java/no/nav/dolly/service/DashboardService.java Outdated
Comment thread apps/dolly-backend/src/main/java/no/nav/dolly/service/DashboardService.java Outdated
Comment thread apps/dolly-backend/src/main/java/no/nav/dolly/service/DashboardService.java Outdated
krharum added 5 commits June 19, 2026 10:07
…ardService, samt oppdater DashboardOversiktDTO for oversiktsdata
…lify data handling #deploy-test-dolly-backend
#deploy-test-dolly-backend
#deploy-dolly-backend
…e in inntektsstubStatus field #deploy-test-dolly-backend

#deploy-dolly-backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants