Closed dominikbraun closed 2 years ago
@dominikbraun I am interested in approaching this problem. Could you let me know how I can onboard myself and guide me where to edit the code?
@amoghrajesh The code structure is pretty simple. All CLI commands, for example timetrace edit record
, are in the cli
package, and the files are named after the commands: All edit
commands are in edit.go
.
The edit record
command is this variable:
The Run
function contains the entire business logic.
There already is a function for determining if a record collides with others: t.RecordCollides()
. It is already being used by the timetrace create record
command:
I think all you need to do is to call this function within the edit record
command.
Can you assign this issue to me so that I can give it a shot? @dominikbraun
At the moment, record collision checks are only performed when creating a belated record using
timetrace create record
but not when editing an existing record.This needs to be changed by calling
t.RecordCollides
when runningtimetrace edit record
.What is record collision?
Say you have 2 records:
And you want to insert a new one:
This record collides with the second (5PM - 8PM) record, because it lies within that record. timetrace doesn't allow this.