akeneo / pim-community-dev

[Community Development Repository] The open source Product Information Management (PIM)
http://www.akeneo.com
Other
954 stars 516 forks source link

Dynamic date in filename disable the download button in export UI #6886

Closed ghost closed 4 years ago

ghost commented 7 years ago

https://github.com/akeneo/pim-community-dev/blob/ecb3898f5860b47f068fe9166476673fab5f8210/src/Pim/Component/Connector/Writer/File/AbstractFileWriter.php#L47

Using dynamic datetime with seconds in path, sometimes, disable the possibility to download the generated file from the interface.

When getPath is called by the FileWriter and then later by the FileWriterArchiver, the returned path can be different, because the timestamp may have changed.

mathewrapid commented 7 years ago

Would a possible solution be to use $this->stepExecution->getJobExecution()->getStartTime()->format($this->datetimeFormat) (cached internally by the class of course)?

ghost commented 7 years ago

Yes, use Start time of the job execution works.