From 4ff13acb255778e047c0dea269b974f1175672c3 Mon Sep 17 00:00:00 2001 From: Rafael Dantas Justo Date: Mon, 22 Jun 2026 13:05:32 -0300 Subject: [PATCH] Fix: Timelog - Allow omitting the billable field When the billable field isn't provided the tasklist or project configuration will be used instead. --- projects/timelog.go | 5 +++-- projects/timelog_test.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/timelog.go b/projects/timelog.go index 9c3b3fe..1a7589c 100644 --- a/projects/timelog.go +++ b/projects/timelog.go @@ -143,8 +143,9 @@ type TimelogCreateRequest struct { // they will be summed up to calculate the total time logged. Minutes int64 `json:"minutes"` - // Billable indicates whether the timelog is billable or not. - Billable bool `json:"isBillable"` + // Billable indicates whether the timelog is billable or not. When not + // provided, it will default to the tasklist or project settings. + Billable *bool `json:"isBillable"` // UserID is an optional ID of the user who logged the timelog. If not // provided, the timelog will be logged by the user making the request. diff --git a/projects/timelog_test.go b/projects/timelog_test.go index 5c88a31..25467a5 100644 --- a/projects/timelog_test.go +++ b/projects/timelog_test.go @@ -43,7 +43,7 @@ func TestTimelogCreate(t *testing.T) { IsUTC: true, Hours: 2, Minutes: 30, - Billable: true, + Billable: new(true), UserID: &testResources.UserID, TagIDs: []int64{testResources.TagID}, }, @@ -59,7 +59,7 @@ func TestTimelogCreate(t *testing.T) { IsUTC: true, Hours: 2, Minutes: 30, - Billable: true, + Billable: new(true), UserID: &testResources.UserID, TagIDs: []int64{testResources.TagID}, },