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}, },