diff --git a/src/commands/CmdInfo.cpp b/src/commands/CmdInfo.cpp index c9e5f118c..6d0725d16 100644 --- a/src/commands/CmdInfo.cpp +++ b/src/commands/CmdInfo.cpp @@ -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; diff --git a/test/uda_orphan.t b/test/uda_orphan.t index 0d2c67259..1c3249fb1 100755 --- a/test/uda_orphan.t +++ b/test/uda_orphan.t @@ -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};