Navigation Menu

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

Export timesheet only exports entries on the current page #534

Closed
infeeeee opened this issue Jan 31, 2019 · 10 comments
Closed

Export timesheet only exports entries on the current page #534

infeeeee opened this issue Jan 31, 2019 · 10 comments

Comments

@infeeeee
Copy link
Contributor

Describe the bug
On My times -> Export timesheet, it only exports entries on the current page, not everything

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'My times'
  2. Make sure there is more entries than the page size (default:25). Pagination available at the bottom.
  3. Click on 'Export Timesheet' on the top right corner.
  4. On the new window it shows only the visible records from the first page, not all of them. Total is calculated only for these entries.

Expected behavior
I think it should export all filtered records, not just the visible ones from the first page. Page size cannot be greater than 100, so I cannot calculate totals for more than 100 entries with one click.

Additional context
It works this way in the demo installation.

I could use invoices for this, but I use this because I just need quick summaries for custom projects and timeframes, and I found I can calculate custom totals quicker this way than with invoices.

Adding an 'unlimited' option to page size would solve this issue temporarily.

@kevinpapst
Copy link
Member

I don't want to support unlimited items for the regular user, neither in the export nor on the "My Times" page. This could be a potential problem, as showing unlimited items might kill your PHP process or your browser due to resource limitations (such as RAM).
When you choose no filter, this means => showing all ("unlimited") items, but paged.
One option would be to show the export button only if a filter was chosen, but that would be a bad UX, as its not clear that (initially invisible) filters are somehow connected to the export button.
Its easy to add more choices for the page size, but my tests with live data showed, that this should not be increased to much. So where do you make a cut? Should that be a config option?

And we should talk about the use case behind this button and my intention was:
"giving the user the option to pass his monthly timesheet to his boss"

The "simple user timesheet export" was never meant to be a source for what you seems to use it for.

If you are running your own Kimai instance, you probably just want to wait for the export module (very soon available - already in work), which does all you want in a much better way.

@infeeeee
Copy link
Contributor Author

Ok, thank you I'm waiting for the exports, that's what I really want!

@bydecker
Copy link

bydecker commented Feb 1, 2019

Hey, ran into the same issue

And we should talk about the use case behind this button and my intention was:
"giving the user the option to pass his monthly timesheet to his boss"

Exactly what I'm using it for. A project sometimes ends up having more than 100 entries a month, so there is no way to export them quickly.

Export also seems to be the only way to see all accumulated hours per project (invoice only shows them separated by activity)?

Great work so far!

@kevinpapst
Copy link
Member

kevinpapst commented Feb 1, 2019

Even though the export module will add a lot of the missing pieces, it won't be available to the regular user in a larger installation, so the user-export needs to be improved.

I'd like to collect some good ideas how that could be achieved. Please share them!

  • A simple one is to use a configuration for the max amount of allowed items per page
  • Another one is to not limited the exported items to the page size, but instead for the user to select a time-range (to avoid creating exports for his entire history)

@bydecker
Copy link

bydecker commented Feb 1, 2019

From a UX perspective it makes sense to take the time-range into account while exporting and ignore the paging. I don't see a use case for exporting a report limited to a fixed set of records.

So my suggestion would be to export all items according to the filter parameters. If those items exceed a certain amount (that could potentially cause PHP/memory issues), you could warn the user about that fact instead of forcing the limit.

@infeeeee
Copy link
Contributor Author

infeeeee commented Feb 1, 2019

Ideas:

  • calculate subtotals. On a dropdown the user can select if they want subtotals by customer, by project or by activity. Maybe an option for export only totals and subtotals without individual entries. Maybe subtotal by month, by day, by week as well.
  • Not exactly about the export but I think it's connected to this issue: I liked the quick buttons in Kimai 1, where I could quickly select last month,this month, last week, this week etc. It would be nice if they reappear.

@kevinpapst
Copy link
Member

kevinpapst commented Feb 1, 2019

@bydecker the biggest problem is: the default filter shows all records. So most of the time someone hits the export button, the complete history would be exported. This is less than sub-optimal.

@infeeeee new feature request => new issue, otherwise this will get lost.

I could use your help in #538 with testing and feedback.

@bydecker
Copy link

bydecker commented Feb 2, 2019

Ah, I see the problem, just updated to the latest release (before that, it used to export the last month only on default settings).

How about:

  • Use default paging for export if no range is set, range otherwise (show info on export page, what filter has been used)
  • Show a dropdown with options (today/this month/last month/ last x entries) if no range is set

@kevinpapst
Copy link
Member

Lets shortcut this discussion, your points are totally valid, so I fixed the issue: all records for the selected time range will be included.
If no range ist, the items for the current month are exported.

@lock
Copy link

lock bot commented Apr 14, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Apr 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants