mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
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:
parent
6c60a8db84
commit
4620b5fd25
2 changed files with 7 additions and 1 deletions
|
@ -286,6 +286,13 @@ bool getDOM(const std::string& name, const Task* task, Variant& value) {
|
||||||
return true;
|
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];
|
Column* column = Context::getContext().columns[canonical];
|
||||||
|
|
||||||
if (size == 1 && column) {
|
if (size == 1 && column) {
|
||||||
|
|
|
@ -317,7 +317,6 @@ void CmdEdit::parseTask(Task& task, const std::string& after, const std::string&
|
||||||
|
|
||||||
// tags
|
// tags
|
||||||
value = findValue(after, "\n Tags:");
|
value = findValue(after, "\n Tags:");
|
||||||
task.remove("tags");
|
|
||||||
task.setTags(split(value, ' '));
|
task.setTags(split(value, ' '));
|
||||||
|
|
||||||
// description.
|
// description.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue