- 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:
Paul Beckingham 2012-07-03 15:54:35 -04:00
parent da575c4043
commit 66eb09ab25
2 changed files with 11 additions and 1 deletions

View file

@ -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.
ViewText journal;

View file

@ -57,7 +57,7 @@ if (open my $fh, '>', 'uda.rc')
# Observe the UDA properly reported by the 'info' command.
$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.
qx{../src/task rc:uda.rc 1 modify /one/two/ 2>&1};