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 by regular user marks the timesheets as exported #4339

Closed
3 tasks done
cbellersen opened this issue Oct 6, 2023 · 1 comment · Fixed by #4710
Closed
3 tasks done

Export by regular user marks the timesheets as exported #4339

cbellersen opened this issue Oct 6, 2023 · 1 comment · Fixed by #4710
Labels
Milestone

Comments

@cbellersen
Copy link

Describe the issue

Regular users have the ability to export their own timesheets with default settings (role create_export is active) and he does not see the "mark as exported toggle".
When the user does an export, the timesheets will be marked as exported.
There are two problems with this:

  • The regular user cannot edit his own timesheets anymore after he has exported them (because default settings will only allow to edit timesheets, which have not been exported yet)
  • The timesheets can easily be overlooked when invoicing the timesheets, because by default only non-exported timesheets will be used in an invoice

I believe this is a bug because IMHO it does not make sense to hide the "mark as exported toggle" (which is great) and then mark the timesheets as exported. I think, that timesheets should be left unchanged when a regular user exports them.

I already tried

Kimai version

2.0.35

How do you run Kimai?

Docker

Which PHP version are you using?

8.1

Logfile

No response

Screenshots

I log in as a regular user and export my own timesheet:
grafik

Now I cannot edit my timesheet anymore:
grafik

Now I log in with an admin user, to check the timesheet. It shows that it was marked as "exported":
grafik

@rbuehler-teletrend
Copy link

I've got the same issue.

Here follows a paste of the other ticket.
(@kevinpapst: I'm sorry for opening a duplicate - I didn't see it when I had a look)

I just see the difference between Kimai 1 and 2 where I think, in Kimai 1 the "mark as exported" checkbox is by default disabled and in Kimai 2 it is by default enabled. Anyhow, the standard user without edit_export_* permissions doesn't see this option, therefore it was never a problem in the past - there was no way for a standard user to change the export flag.

I'd wish that a standard user can create an export from the export menu but without changing the export flag.
This was / would be useful, if a standard user wants to give an overview to a customer about the progress of a project.
Yes, you could do that through the export of timesheets if export_*_timesheet permissions are given. It even doesn't change the export flag.
But here the possibilities to export are limited and you can't select from various (even custom) PDF's for example.

One option could be to not include the permission to change the exported flag into create_export and add it as a separate permission.
Or to change the default in the export menu back to not mark as exported.
If this default is defined somewhere in the database, I would also be happy to know where to change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants