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:
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,
|
||||
|
||||
Reference in New Issue
Block a user