From 01bb76b3b67cd2198c3c14e5aca667f64610b039 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 27 Oct 2010 22:22:36 -0400 Subject: [PATCH] Feedback - Modified feedback when the number of pending tasks in a project changes (thanks to Peter De Poorter). --- AUTHORS | 2 +- src/report.cpp | 2 +- src/tests/project.t | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/AUTHORS b/AUTHORS index a6c6bf793..f4f7a5629 100644 --- a/AUTHORS +++ b/AUTHORS @@ -62,4 +62,4 @@ suggestions: Dirk Deimeke Michelle Crane Elizabeth Maxson - + Peter De Poorter diff --git a/src/report.cpp b/src/report.cpp index cb07bc403..cc1728a9e 100644 --- a/src/report.cpp +++ b/src/report.cpp @@ -2863,7 +2863,7 @@ std::string onProjectChange (Task& task, bool scope /* = true */) if (project != "") { if (scope) - msg << "The scope of project '" + msg << "The project '" << project << "' has changed. "; diff --git a/src/tests/project.t b/src/tests/project.t index 42e7314f4..ac5aa061a 100755 --- a/src/tests/project.t +++ b/src/tests/project.t @@ -41,26 +41,26 @@ if (open my $fh, '>', 'pro.rc') # Test the project status numbers. my $output = qx{../task rc:pro.rc add one pro:foo}; -like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 0% complete \(1 of 1 tasks remaining\)\./, 'add one'); +like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(1 of 1 tasks remaining\)\./, 'add one'); $output = qx{../task rc:pro.rc add two pro:'foo'}; -like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 0% complete \(2 of 2 tasks remaining\)\./, 'add two'); +like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(2 of 2 tasks remaining\)\./, 'add two'); $output = qx{../task rc:pro.rc add three pro:'foo'}; -like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 0% complete \(3 of 3 tasks remaining\)\./, 'add three'); +like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(3 of 3 tasks remaining\)\./, 'add three'); $output = qx{../task rc:pro.rc add four pro:'foo'}; -like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 0% complete \(4 of 4 tasks remaining\)\./, 'add four'); +like ($output, qr/The project 'foo' has changed\. Project 'foo' is 0% complete \(4 of 4 tasks remaining\)\./, 'add four'); $output = qx{../task rc:pro.rc 1 done}; like ($output, qr/Project 'foo' is 25% complete \(3 of 4 tasks remaining\)\./, 'done one'); $output = qx{../task rc:pro.rc 2 delete}; -like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 33% complete \(2 of 3 tasks remaining\)\./, 'delete two'); +like ($output, qr/The project 'foo' has changed\. Project 'foo' is 33% complete \(2 of 3 tasks remaining\)\./, 'delete two'); $output = qx{../task rc:pro.rc 3 pro:bar}; -like ($output, qr/The scope of project 'foo' has changed\. Project 'foo' is 50% complete \(1 of 2 tasks remaining\)\./, 'change project'); -like ($output, qr/The scope of project 'bar' has changed\. Project 'bar' is 0% complete \(1 of 1 tasks remaining\)\./, 'change project'); +like ($output, qr/The project 'foo' has changed\. Project 'foo' is 50% complete \(1 of 2 tasks remaining\)\./, 'change project'); +like ($output, qr/The project 'bar' has changed\. Project 'bar' is 0% complete \(1 of 1 tasks remaining\)\./, 'change project'); # Cleanup. unlink 'pending.data';