Skip to content

Fix blank labels on shared reports grouped by date intervals - #1201

Open
1yakub wants to merge 1 commit into
solidtime-io:mainfrom
1yakub:fix/shared-report-date-group-labels
Open

Fix blank labels on shared reports grouped by date intervals#1201
1yakub wants to merge 1 commit into
solidtime-io:mainfrom
1yakub:fix/shared-report-date-group-labels

Conversation

@1yakub

@1yakub 1yakub commented Aug 7, 2026

Copy link
Copy Markdown

What does this PR do?

Shared report links grouped by day, week, month or year rendered without labels: the table rows and pie chart segments had no name and the Group by heading was blank. The backend leaves description null for date interval groups (loadDescriptorsMap has no branch for them) and the page fell back to emptyPlaceholder, which has no date entries either. The chart at the top was the only labeled part because it formats el.key itself.

This resolves date group names on the shared report page from entry.key, with the same formatWeek and formatDate helpers that ReportingChart.vue already uses and the date_format the report payload already carries. Entity groupings keep the existing description and placeholder behavior.

The thinking behind the decisions:

  • Fixed in the frontend instead of filling description in the backend, so the labels respect the organization date format the payload sends and stay consistent with how the chart right above the table formats the same keys.
  • The pie chart's gray bucket now keys on entry.key === null instead of entry.description === null, because date groups have a null description but a real key. The none bucket stays gray, date slices get their formatted name and a seeded color.
  • getGroupLabel falls back to the raw value, so the heading cannot render blank for an unknown group type.
  • Week keys come out exactly as the chart already shows them ("Week 31"). Day, month and year keys go through formatDate like the chart axis does.

What I tested and how

  • npm run format:check, npm run lint (0 errors) and npm run test:unit (185 passing) locally.
  • npm run type-check reports no issues in the changed file. The only error in my environment is the pre existing vendor/tightenco/ziggy resolution in app.ts, which needs a composer install and is unrelated to this change.
  • Checked in the API client schema that DetailedWithDataReportResource includes key on both grouping levels, so the public payload already carries everything the page needs.
  • I did not run a full backend to view the page live. If you want an e2e case for this I am happy to extend e2e/shared-reports.spec.ts with a report grouped by week created through the API.

Checklist (DO NOT REMOVE)


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Aug 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

Shared report shows blank names when the report is grouped by day, week, month or year

2 participants