mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
UDAs - User Defined Attributes
- Added support for named allowable values.
This commit is contained in:
parent
0d3f6f990d
commit
7f1d8c3682
5 changed files with 34 additions and 2 deletions
|
@ -181,7 +181,7 @@ void Column::uda (std::map <std::string, Column*>& all)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
Column* Column::uda (const std::string& name)
|
||||
{
|
||||
Column* c = new ColumnUDA ();
|
||||
ColumnUDA* c = new ColumnUDA ();
|
||||
c->_name = name;
|
||||
|
||||
std::string key = "uda." + name + ".type";
|
||||
|
@ -195,6 +195,11 @@ Column* Column::uda (const std::string& name)
|
|||
key = "uda." + name + ".label";
|
||||
if (context.config.get (key) != "")
|
||||
c->_label = context.config.get (key);
|
||||
|
||||
key = "uda." + name + ".values";
|
||||
if (context.config.get (key) != "")
|
||||
split (c->_values, context.config.get (key), ',');
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue