mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
UDA Edit
- Added UDA and Orphan support to the 'edit' command. It will show the data, but not yet recognize changes to that data.
This commit is contained in:
parent
360ab3138a
commit
9028ca4945
5 changed files with 96 additions and 0 deletions
22
src/Task.cpp
22
src/Task.cpp
|
@ -945,6 +945,28 @@ void Task::removeTag (const std::string& tag)
|
|||
recalc_urgency = true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// A UDA is an attribute that has supporting config entries such as a data type:
|
||||
// 'uda.<name>.type'
|
||||
void Task::getUDAs (std::vector <std::string>& names) const
|
||||
{
|
||||
Task::const_iterator it;
|
||||
for (it = this->begin (); it != this->end (); ++it)
|
||||
if (context.config.get ("uda." + it->first + ".type") != "")
|
||||
names.push_back (it->first);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// A UDA Orphan is an attribute that is not represented in context.columns.
|
||||
void Task::getUDAOrphans (std::vector <std::string>& names) const
|
||||
{
|
||||
Task::const_iterator it;
|
||||
for (it = this->begin (); it != this->end (); ++it)
|
||||
if (it->first.substr (0, 11) != "annotation_")
|
||||
if (context.columns.find (it->first) == context.columns.end ())
|
||||
names.push_back (it->first);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Task::substitute (
|
||||
const std::string& from,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue