Skip to content

[BUG] Grid export: allow specifying the download file name - #2023

Open
Jonathon-Meney-Torq wants to merge 2 commits into
pimcore:2026.2from
TorqIT:fix/grid-export-progress-toast
Open

[BUG] Grid export: allow specifying the download file name#2023
Jonathon-Meney-Torq wants to merge 2 commits into
pimcore:2026.2from
TorqIT:fix/grid-export-progress-toast

Conversation

@Jonathon-Meney-Torq

Copy link
Copy Markdown
Contributor

What

Allows grid CSV/XLSX exports to specify the download file name.

  • New StepConfig::SETTINGS_FILE_NAME (fileName) config key, documented in the OpenAPI request schemas for element and folder exports.
  • ExportService reads config.fileName, sanitizes it (basename, restricted character set), and stores it in the job's environment data under a new DownloadServiceInterface::EXPORT_DOWNLOAD_FILENAME key — the same mechanism ZIP downloads already use.
  • DownloadService::resolveDownloadName() now resolves the export file name first, then the ZIP file name, and falls back to the name passed by the controller (export.csv / export.xlsx), so existing behavior is unchanged when no file name is provided.

Why

Grid export downloads were always named export.csv / export.xlsx, making it hard to tell which grid an export came from. With this change the Studio UI sends a grid name + timestamp file name (see the companion studio-ui-bundle PR), e.g. Product_2026-09-01_14-32-10.csv.

Closes pimcore/platform-version#437

Copilot AI balanced review requested due to automatic review settings September 1, 2026 17:48

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

Adds configurable, sanitized filenames for CSV/XLSX grid export downloads while preserving existing fallback names.

Changes:

  • Adds the fileName export configuration.
  • Stores sanitized filenames in job environment data.
  • Resolves custom filenames before ZIP and controller fallbacks.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Export/Service/ExecutionEngine/ExportService.php Sanitizes and stores requested filenames.
src/Export/Service/DownloadServiceInterface.php Defines the export filename environment key.
src/Export/Service/DownloadService.php Adds export filename resolution and fallbacks.
src/Export/Attribute/Request/ExportFolderDataRequestBody.php Documents folder-export filenames.
src/Export/Attribute/Request/ExportDataRequestBody.php Documents element-export filenames.
src/ExecutionEngine/Util/StepConfig.php Adds the fileName configuration key.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/ExecutionEngine/Util/StepConfig.php
Comment thread src/Export/Attribute/Request/ExportDataRequestBody.php Outdated
Comment thread src/Export/Attribute/Request/ExportFolderDataRequestBody.php Outdated
Comment thread src/Export/Service/DownloadService.php
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

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