From 68f4b67283cb439d296f54deadb18297e572cad9 Mon Sep 17 00:00:00 2001 From: Elias Kohout Date: Sun, 29 Mar 2026 19:27:18 +0200 Subject: [PATCH] fix: properties like type were not correctly replaced when updating a node --- cmd/update.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmd/update.go b/cmd/update.go index 1e4f807..d24d279 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -65,10 +65,18 @@ var updateCmd = &cobra.Command{ } else if slices.Contains(uAddTags, "_status::open") { uRmTags = append(uRmTags, "_status::done") } - if slices.ContainsFunc(uAddTags, func(e string) bool { return strings.HasPrefix(e, "_prio") }) { - uRmTags = append(uRmTags, "_prio::low", "_prio::medium", "_prio::high") + + for _, prefix := range []string{"_type::", "_status::", "_prio::", "_namespace::"} { + if slices.ContainsFunc(uAddTags, func(e string) bool { return strings.HasPrefix(e, prefix) }) { + for _, existing := range node.Tags { + if strings.HasPrefix(existing, prefix) { + uRmTags = append(uRmTags, existing) + } + } + } } + if cmd.Flags().Changed("title") { node.Title = uTitle }