Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GridFieldExportButton export csv filename #11458

Open
4 tasks done
3Dgoo opened this issue Nov 7, 2024 · 0 comments
Open
4 tasks done

Improve GridFieldExportButton export csv filename #11458

3Dgoo opened this issue Nov 7, 2024 · 0 comments

Comments

@3Dgoo
Copy link
Contributor

3Dgoo commented Nov 7, 2024

Description

Currently the GridFieldExportButton export filename is always the following no matter what the model is:

export-$now.csv

With a date format of:

d-m-Y-H-i

The developer cannot modify this. If the cms user is exporting multiple models, they all have the same name, making it hard to differentiate between exports. The time stamp of d-m-Y-H-i is not necessarily ideal for sorting reasons and also is not configureable.

It would be great to update the filename to something this:

[classname]-export-[timestamp].csv

With a default date format of:

Y-m-d-H-i

The [classname] would automatically be replaced with the model classname. Resulting in the following example filenames:

order-export-2024-11-07-23-15.csv
product-export-2024-11-07-23-16.csv

The filename and date format should also be changed on a per button basis through the code.

Additional context or points of discussion

No response

Validations

  • You intend to implement the feature yourself
  • You have read the contributing guide
  • You strongly believe this feature should be in core, rather than being its own community module
  • You have checked for existing issues or pull requests related to this feature (and didn't find any)
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

No branches or pull requests

1 participant