arno1979 / kimai2-custom-export

3 stars 2 forks source link

Multi project export #2

Closed ftrojahn closed 7 months ago

ftrojahn commented 7 months ago

Hi @arno1979

when I tried to export multiple projects of a customer I've got error 500 in line 173 of Resources/views/export/custom-export.pdf.twig

I've switched the duration summary to show the digital sum instead of hours:minutes, so this worked for me.

After some cosmetics to show the selected projects in the header I've come up with this:

https://github.com/arno1979/kimai2-custom-export/compare/master...ftrojahn:kimai2-custom-export:multiple-projects

This is IMHO too hacky for PR, but feel free to merge if you want.

arno1979 commented 7 months ago

Hi @ftrojahn,

thanks for using my plugin. I think you are the first one... :) I merged your PR, I obviously overlooked this when I rewrote the plugin after the last big Kimai update.

Regarding this issue: I kind of understand what you are describing. But since I originally wrote this plugin back when I used to do a lot more coding and I wrote it for a very specific task (export for one customer and one project only) I won't be doing a merge in this case. I always thought that the error handling was a disaster (there is none) but since up until now no one except me used the plugin I never bothered to fix this.

Thanks for your remarks though and I hope the plugin will work well for you.

ftrojahn commented 7 months ago

Hi @arno1979

thanx for your fast reply. As expected, I just let my fork here to inspire others, optimizing for my needs in another branch.

May be nobody got back to you due to the 500 when trying, but your plugin is a good start for anybody who wants to customize the export for whatever reason.

Have a nice day Falko