From 57e433ade2e450ebaab1efeef34bd0f02823f2e9 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 28 Jun 2025 14:22:57 +0300 Subject: feat: add project field support to TaskSamurai MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add comprehensive project field support including: - Project column in table view with automatic width calculation - 'J' hotkey to edit project in both table and detail views - Project field in task detail view (between Start and Entry) - Search functionality includes project names - Enter key on project column allows inline editing The project field integrates seamlessly with Taskwarrior's native project support and follows the same UI patterns as other editable fields in the application. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/task/task.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/task') diff --git a/internal/task/task.go b/internal/task/task.go index 86c93f4..2c7f8e8 100644 --- a/internal/task/task.go +++ b/internal/task/task.go @@ -26,6 +26,7 @@ type Task struct { ID int `json:"id"` UUID string `json:"uuid"` Description string `json:"description"` + Project string `json:"project"` Tags []string `json:"tags"` Status string `json:"status"` Start string `json:"start"` @@ -298,6 +299,11 @@ func SetDescription(id int, desc string) error { return modifyTask(id, "description:"+desc) } +// SetProject changes the project of the task with the given id. +func SetProject(id int, project string) error { + return modifyTask(id, "project:"+project) +} + // Annotate adds an annotation to the task with the given id. func Annotate(id int, text string) error { if id <= 0 { -- cgit v1.2.3