Skip to content

Allow entries creation with start date == end date of another existing entry #357

@enriquezrene

Description

@enriquezrene

As a user, I want to register my hours in an ordered way.
For example, I have these entries:

start_time: 10:00 end_time: 11:00
start_time: 11:01 end_time: 12:00
start_time: 12:01 end_time: 13:00

I would like to be able to have the entries with the following information:
start_time: 10:00 end_time: 11:00
start_time: 11:00 end_time: 12:00
start_time: 12:00 end_time: 13:00

From a technical perspective, this can be solved by playing a little bit with the seconds used. For example, we may set the start_time seconds equal to the end_time seconds + 1 if the entry is being created on the same day, hour, and minute. In this way, we can have the following data stored:

start_time: 10:00:59 end_time: 11:00:14
start_time: 11:00:15 end_time: 12:00:34
start_time: 12:00:35 end_time: 13:00:01

In this way, times are not going to overlap at all and they all are one next to each other.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions