Skip to content

Commit 4620b5f

Browse files
authored
Make tags.none: filter work again (#3877)
* Don't remove the legacy 'tags' property * Simulate the `tags` DOM property This refers to the deprecated "tags" property of tasks. This property usually still exists, for compatibility with older versions, but should not be relied on anymore.
1 parent 6c60a8d commit 4620b5f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/DOM.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,13 @@ bool getDOM(const std::string& name, const Task* task, Variant& value) {
286286
return true;
287287
}
288288

289+
// The "tags" property is deprecated, but it is documented as part of the DOM, so simulate it.
290+
if (size == 1 && canonical == "tags") {
291+
auto tags = ref->getTags();
292+
value = Variant(join(",", tags));
293+
return true;
294+
}
295+
289296
Column* column = Context::getContext().columns[canonical];
290297

291298
if (size == 1 && column) {

src/commands/CmdEdit.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ void CmdEdit::parseTask(Task& task, const std::string& after, const std::string&
317317

318318
// tags
319319
value = findValue(after, "\n Tags:");
320-
task.remove("tags");
321320
task.setTags(split(value, ' '));
322321

323322
// description.

0 commit comments

Comments
 (0)