-
Notifications
You must be signed in to change notification settings - Fork 19
csv export for accounting posts (64017) #251
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
base: master
Are you sure you want to change the base?
Conversation
298de57
to
a3964d8
Compare
4431b58
to
f4fa78b
Compare
private | ||
|
||
def cockpit_csv_filename | ||
basename = Order::Services::CsvFilenameGenerator.new(order, params).filename | ||
"#{@period.start_date}_#{@period.end_date}_".parameterize + basename |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 little nitpicks:
- It'd be nice to have the name of the model in the filename.
- If there is no start_date, this will lead to a filename like
_2025-04-25_puzzletime-BLS-DIS.csv
You can orient yourself on this method:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have adapted the file naming. However, I also don't really like this naming schema, since the periods egal - 01.01.2025
and 01.01.2025 - 01.01.2025
both receive the same filename (although the contents might/will differ greatly).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, didn't know that detail. Can you do a special handling for one day, and we open a PTime Ticket for a centralized naming Helper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that sounds great. There is a similar issue, where the periods egal - 01.01.2025
and 01.01.2025 - egal
also receive the same name. So thinking about this and implementing this cleanly would be nice.
Temporarily, I would've just repeated the date in the case of one day (i.e. accounting_posts_2025-01-01_2025_01_01.csv). And also, I would just put egal
there if there is no start/end date. This should lead to no collisions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, we'll use this for now and then track the centralized helper in Ticket #64226.
Do you need to change something, for the 'egal' naming rules, or can I merge this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved after we solve the filename discussion
I now made a change to disambiguate the filename (se answer above) |
No description provided.