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

Allow Configurable Future Time Entries with Time Limit #4912

Open
lingged-in opened this issue Jun 12, 2024 · 0 comments
Open

Allow Configurable Future Time Entries with Time Limit #4912

lingged-in opened this issue Jun 12, 2024 · 0 comments

Comments

@lingged-in
Copy link

Describe the problem

It would be beneficial to have the option to permit time entries in the future while limiting how far into the future these entries can be made. This feature would enable users to plan ahead slightly without allowing excessively speculative time tracking. For example, a configuration setting could be added to allow time entries up to 15 minutes into the future, but not beyond.

Describe the solution you'd like

  • Configuration Setting:

    • Introduce a new configuration option in the Kimai settings (e.g., future_time_entry_limit) to define the maximum allowable future time for entries. This setting could be set in minutes.
    • Default value could be set to 0 (disallow future entries), ensuring backward compatibility for users who do not wish to use this feature.
  • Validation Logic:

    • Implement validation logic in the backend to check the difference between the current time and the time of the new entry.
    • If the entry exceeds the configured future limit, return an appropriate error message to the user (e.g., "Time entries cannot be made more than {limit} minutes into the future.").
  • User Interface:

    • Update the front-end to ensure that the time picker restricts users from selecting times beyond the allowed future limit.
    • Provide visual feedback if the user attempts to set a time that is too far in the future.

Example

If the future_time_entry_limit is set to 15 minutes:

  • The current time is 2:00 PM.
  • Users can create time entries up to 2:15 PM.
  • Attempts to create entries for 2:16 PM or later will be disallowed.

Describe alternatives you've considered

No response

Screenshots

No response

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

No branches or pull requests

1 participant