mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
UDAs
- Orphaned UDA name/value pairs show up in the 'info' report, but with the name listed as '[name value]'. The brackets indicate that the data is not modifiable.
This commit is contained in:
parent
da575c4043
commit
66eb09ab25
2 changed files with 11 additions and 1 deletions
|
@ -352,6 +352,16 @@ int CmdInfo::execute (std::string& output)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show any orphaned UDAs, which are identified by not being represented in
|
||||||
|
// the context.columns map.
|
||||||
|
for (att = all.begin (); att != all.end (); ++att)
|
||||||
|
if (context.columns.find (*att) == context.columns.end ())
|
||||||
|
{
|
||||||
|
row = view.addRow ();
|
||||||
|
view.set (row, 0, "[" + *att);
|
||||||
|
view.set (row, 1, task->get (*att) + "]");
|
||||||
|
}
|
||||||
|
|
||||||
// Create a second table, containing undo log change details.
|
// Create a second table, containing undo log change details.
|
||||||
ViewText journal;
|
ViewText journal;
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ if (open my $fh, '>', 'uda.rc')
|
||||||
|
|
||||||
# Observe the UDA properly reported by the 'info' command.
|
# Observe the UDA properly reported by the 'info' command.
|
||||||
$output = qx{../src/task rc:uda.rc 1 info 2>&1};
|
$output = qx{../src/task rc:uda.rc 1 info 2>&1};
|
||||||
like ($output, qr/UDA Orphan\s+foo/, 'UDA orphan shown');
|
like ($output, qr/extra\s+foo/, 'UDA orphan shown');
|
||||||
|
|
||||||
# Modify the task, ensure UDA preserved.
|
# Modify the task, ensure UDA preserved.
|
||||||
qx{../src/task rc:uda.rc 1 modify /one/two/ 2>&1};
|
qx{../src/task rc:uda.rc 1 modify /one/two/ 2>&1};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue