Show meta field columns in export preview datatable - #6152
Open
hilfor wants to merge 3 commits into
Open
Conversation
Member
|
Thanks, LGTM 👍 |
There was a problem hiding this comment.
🟡 Changes recommended
Dynamic columns leave the overflow warning row misaligned because its colspan remains hard-coded.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds timesheet meta fields to the export preview.
Changes:
- Dispatches the export meta-display event.
- Adds dynamic meta-field columns and visibility controls.
- Adds controller integration coverage and PHPStan fixes.
File summaries
| File | Description |
|---|---|
src/Controller/ExportController.php |
Supplies meta-field definitions to the export template. |
templates/export/index.html.twig |
Renders configurable meta-field columns. |
tests/Controller/ExportControllerTest.php |
Tests meta columns and resolves type warnings. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The export preview datatable hardcodes its columns and does not pick up meta fields registered via TimesheetMetaDisplayEvent. Dispatch the event in ExportController and render the fields as mf_ columns, matching the existing pattern in TimesheetAbstractController and timesheet/index.html.twig.
- Guard nullable Project in addProject callback - Assert response content is string before assertStringContainsString - Assert template is not null before calling getId - Add test for meta field columns in export preview
The skipped-rows warning row used a literal colspan of 10. That matched the column count when it was introduced in 0330f45, but columns have been added since and the rate columns became conditional, so the span already stopped short of the last column. Timesheet meta columns widen the gap further. Derive the span from the same columns hash the table header iterates over, as templates/reporting/project_list_data.html.twig does. Claude-Session: https://claude.ai/code/session_011Ax3aU3Hor35RRu5G7ZBUm
hilfor
force-pushed
the
feature/export-meta-columns
branch
from
September 4, 2026 11:47
77697ca to
c521719
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Rendering meta fields introduces an N+1 query pattern for previews of up to 500 entries.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Balanced
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
TimesheetMetaDisplayEvent::EXPORTinExportController::indexAction()and passmetaColumnsto the templatemf_columns to the export preview datatable and column visibility modal inexport/index.html.twigTimesheetAbstractController/timesheet/index.html.twigTest plan
testIndexActionShowsMetaFieldColumnstoExportControllerTestExportControllerTest