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.
This commit is contained in:
Dustin J. Mitchell 2025-05-12 02:16:54 -04:00 committed by GitHub
parent 6c60a8db84
commit 4620b5fd25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -286,6 +286,13 @@ bool getDOM(const std::string& name, const Task* task, Variant& value) {
return true;
}
// The "tags" property is deprecated, but it is documented as part of the DOM, so simulate it.
if (size == 1 && canonical == "tags") {
auto tags = ref->getTags();
value = Variant(join(",", tags));
return true;
}
Column* column = Context::getContext().columns[canonical];
if (size == 1 && column) {

View file

@ -317,7 +317,6 @@ void CmdEdit::parseTask(Task& task, const std::string& after, const std::string&
// tags
value = findValue(after, "\n Tags:");
task.remove("tags");
task.setTags(split(value, ' '));
// description.