Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions projects/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,13 @@ type TaskListRequestFilters struct {
// to true, only tasks matching all specified tags will be returned.
MatchAllTags *bool

// OnlyUnassigned is an optional flag to only return tasks with no assignee.
OnlyUnassigned *bool

// OnlyUnplanned is an optional flag to only return tasks that are
// unassigned, have no due date, or are missing estimated time.
OnlyUnplanned *bool

// Page is the page number to retrieve. Defaults to 1.
Page int64

Expand Down Expand Up @@ -861,6 +868,12 @@ func (t TaskListRequestFilters) apply(req *http.Request) {
if t.MatchAllTags != nil {
query.Set("matchAllTags", strconv.FormatBool(*t.MatchAllTags))
}
if t.OnlyUnassigned != nil {
query.Set("onlyUnassignedTasks", strconv.FormatBool(*t.OnlyUnassigned))
}
if t.OnlyUnplanned != nil {
query.Set("onlyUnplanned", strconv.FormatBool(*t.OnlyUnplanned))
}
if t.Page > 0 {
query.Set("page", strconv.FormatInt(t.Page, 10))
}
Expand Down