Fix blank labels on shared reports grouped by date intervals - #1201
Open
1yakub wants to merge 1 commit into
Open
Fix blank labels on shared reports grouped by date intervals#12011yakub wants to merge 1 commit into
1yakub wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
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
descriptionnull for date interval groups (loadDescriptorsMaphas no branch for them) and the page fell back toemptyPlaceholder, which has no date entries either. The chart at the top was the only labeled part because it formatsel.keyitself.This resolves date group names on the shared report page from
entry.key, with the sameformatWeekandformatDatehelpers thatReportingChart.vuealready uses and thedate_formatthe report payload already carries. Entity groupings keep the existing description and placeholder behavior.The thinking behind the decisions:
descriptionin 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.entry.key === nullinstead ofentry.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.getGroupLabelfalls back to the raw value, so the heading cannot render blank for an unknown group type.formatDatelike the chart axis does.What I tested and how
npm run format:check,npm run lint(0 errors) andnpm run test:unit(185 passing) locally.npm run type-checkreports no issues in the changed file. The only error in my environment is the pre existingvendor/tightenco/ziggyresolution inapp.ts, which needs a composer install and is unrelated to this change.DetailedWithDataReportResourceincludeskeyon both grouping levels, so the public payload already carries everything the page needs.e2e/shared-reports.spec.tswith a report grouped by week created through the API.Checklist (DO NOT REMOVE)
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.