Commit graph

695 commits

Author SHA1 Message Date
Paul Beckingham
98f215b1b5 Feature: scheduled date
- Supports 'scheduled' date for tasks, which represent the earliest opportunity
  to work on a task.
- Added unit tests for urgency.
- Implemented color rule.
- Added scheduled to 'info' report.
- Updated assorted documentation.
- Removed comments in default rc because they are never seen.
- Added (broken) 'ready' report, which is like 'next' but only for ready tasks.
2012-05-13 17:19:22 -04:00
Louis-Claude Canon
1364202d30 Feature
- Allow UUIDs and IDs range when modifying task dependencies.
- Update man page.
- Add unit tests.
- Fatorize code when adding and removing dependencies in Task.cpp.
2012-05-07 22:59:25 -04:00
Louis-Claude Canon
5ffb65b5ac Enhancement
- More consistent test of when adding or deleting a dependency.
- Update one unit test.
2012-05-07 19:59:10 -04:00
Paul Beckingham
dc404d76b9 Unit Tests
- Added tests for bug #1006 (thanks to Louis-Claude Canon).
2012-05-05 14:14:01 -04:00
Paul Beckingham
873376c287 Performance improvements:
- Added parse-free convenience functions
2012-05-05 13:28:02 -04:00
Paul Beckingham
ef8486ea1a Unit Tests
- Renamed bug.987.t to bug.987.x until faketime is available to us.
2012-04-30 10:37:39 -04:00
Louis-Claude Canon
1a267aa708 Unit tests
- Added tests for bug #987

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-04-30 10:36:00 -04:00
Louis-Claude Canon
3d6536d1f5 Unit tests
- Added tests for bug #991

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-04-30 10:35:00 -04:00
Louis-Claude Canon
3440eb0c10 Bug #986
- Complete the previous fix: dates in the journal entries are also formatted
  according to the correct configuration variable.
- Add unit tests.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-04-30 08:49:09 -04:00
Paul Beckingham
f4bfa1b2fd Bug #995
- Fixed bug #995, which mis-parsed UUIDs in filters as other elements (thanks
  to Bryce Harrington).
- Nibbler no longer permits 8-character UUID abbreviations, because too often
  they resemble other forms, such as '1111111d' which looks like a duration.
- Modified unit tests accordingly.
2012-04-29 00:28:28 -04:00
Paul Beckingham
35122154ef Bug #986
- Fixed bug #986, so that the 'info' report uses the correct date format
  (thanks to Louis-Claude Canon).
2012-04-21 13:02:31 -04:00
Paul Beckingham
0918a7c79a Bug #973
- Fixed bug #973, including 'urgency' in the 'export' output (thanks to Andy
  Spiegl).
2012-04-15 19:45:42 -04:00
Paul Beckingham
2203d3364d Bug
- Fixed bug where '6 months' was interpreted as 180 days, but when rendered
  was shown as '5 months' (thanks to Aikido Guy).
- Multiple unit test corrections.
2012-04-04 18:42:11 -04:00
Christoph Robbert
f5b841e8a6 Unit Tests
- Added test for bug #954.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-03-31 15:33:49 -04:00
Paul Beckingham
95e36d1145 Enhancement
- Broke the indentTree function into two pieces - one that processes
  a list, the other that processes a single item.  This makes it more
  efficient for use places that have only one element.
2012-03-25 16:54:13 -04:00
Paul Beckingham
ac4d90f1f6 Feature Pulled
- Removed the feature that allows commands to be piped in to stdin,
  and appended to any existing command line.  This feature is
  conditionally compiled, controlled by the FEATURE_STDIN define in
  main.h
- Many unit tests contained "echo '-- y'", and now use "echo 'y'"
  because the '--' is no longer supported on stdin.
- Thanks to the IRC team for testing, including Bryce Harrington,
  Sam Stuck, Owen Clarke, Greg Grossmeier.
2012-03-17 10:46:05 -04:00
Paul Beckingham
80d6655709 Bug
- Fixed problem where 'project' was not supported as a verbosity token (thanks
  to Adam Gibbins).
2012-03-17 10:11:55 -04:00
Paul Beckingham
86e74c1020 Code Cleanup
- Removed unused function and corresponding unit tests.  YAGNI.
2012-03-11 15:33:45 -04:00
Paul Beckingham
507ee20f3b Unit Tests
- Fixed UDA test that didn't allow for missing data.
2012-03-06 01:33:26 -05:00
Paul Beckingham
c8027a17c1 Feature
- Missing data now tolerated for UDAs.
- Info command includes all column data, even for unrecognized types.
2012-03-05 22:49:41 -05:00
Owen Clarke
8177b74a52 Unit Tests
- Fixed compile warning caused by an ambiguous decimal type.
2012-03-05 19:57:14 +11:00
Paul Beckingham
a95832ff3b Unit Tests
- Changed a test that adds a task that is due in one hour, then
  verifies that the task is 'due'.  This fails when run between
  the times 2300 and 2400.  Now the test makes the task due in
  5 minutes, which narrows the window when the test can fail.
  This no longer coincides with the time the tinderbox runs.
2012-03-04 20:30:54 -05:00
Paul Beckingham
27c30d1b65 Unit Tests
- Fixed warning caused by misinterpretation of arguments, by coercion.
2012-03-04 19:37:26 -05:00
Owen Clarke
4792517515 Bug #936
- Fixed nag.t failing with Perl 5.8.4
2012-03-05 09:16:11 +11:00
Owen Clarke
f36f483d1e Bug #944
- Fixed merge.t failing when run on an NFS share
2012-03-05 08:26:08 +11:00
Paul Beckingham
77200d7eb4 Bug #837
- Fixed bug #837, which caused incorrect urgency calculations for tasks that
  have completed dependencies, and problems when editing those tasks (thanks
  to Matt Kraai).
- Added Task::addDependency (const std::string&) method for reconstructing
  dependencies on tasks with no ID.
- Modfified Task::urgency_blocked so that it considers the blocking task's
  status.  This is an expensive test, and so it is wrapped by a cheaper test
  to see if there are/were any dependencies at all.  This means that urgency
  calculations are not slowed for tasks without dependencies, and is slower
  but more accurate for tasks that do have dependencies.
- Modified edit command so that dependencies are shown as IDs or UUIDs
  depending on whether the task is pending or not.
- Modified edit command so that dependencies are parsed as IDs or UUIDs
  depending on whether the task is pending or not.
- Modified wording in the template of the edit command to reflect the above.
- Added unit tests bug.837.t.
2012-03-04 00:05:11 -05:00
Paul Beckingham
524f7f0919 Unit Tests
- Now that the 'diagnostics' command can detect duplicate UUID
  values, it makes sense to incorporate that into unit tests that
  employ multiple recurring tasks.
2012-03-03 10:05:27 -05:00
Paul Beckingham
50825bc61a Bug #851
- Fixed bug #851, which failed to recognize durations like '1day' when
  filtering date attributes (thanks to Philipp Woelfel).
- Added unit tests.
2012-02-28 00:27:48 -05:00
Paul Beckingham
e42a5a831a Bug #865, #886
- Fixed bugs #865 and #886, which caused silent failure of unrecognized dates
  (thanks to Michelle Crane).
2012-02-27 00:36:53 -05:00
Paul Beckingham
5feb736939 Bug
- Fixed problem where urgency was not properly calculated for waiting tasks.
- Tweaked urgency coefficients to make most of the values closer together, and
  therefore more sensitive.
- Inverted 'waiting' coefficient.
- Boosted 'next', 'due' and 'blocking' coefficients.
- Modified unit tests accordingly.
- Lessened the impact of 'blocked', 'project', 'tags' and 'age'.
2012-02-26 23:13:15 -05:00
Paul Beckingham
0fe5887af8 Unit Tests
- Change #819 test to pass, because the bug is deferred.
- Change #884 test to pass, because the bug is deferred.
- Added Najmi Ahmad Zabidi to AUTHORS file, for suggesting a specific
  verbosity control.
- Added some stealth unit tests.
2012-02-26 17:56:15 -05:00
Paul Beckingham
824cba7152 Bugs #552, #863
- Fixed bug #552, where 'rc.verbose=off' suppressed warnings (thanks to Peter
  De Poorter).
- Fixed bug #863, which suppressed report labels with rc.verbose=off (thanks to
  Michelle Crane).
2012-02-26 17:01:13 -05:00
Paul Beckingham
5b3cba2e70 Unit Tests
- Enabled more recurring task tests.
2012-02-26 14:57:21 -05:00
Paul Beckingham
bcf416e71f Unit Tests
- Added tests for #884.
2012-02-26 14:38:48 -05:00
Paul Beckingham
ceabcdd6c3 Unit Tests
- Reduced complexity in the test.
2012-02-26 14:37:01 -05:00
Paul Beckingham
5396c718ef Unit Tests
- Added test to illustrate the workaround.
2012-02-26 14:02:40 -05:00
Paul Beckingham
1f5146e7a0 Unit Tests
- Corrected test count and removed diag output.
2012-02-26 13:39:55 -05:00
Paul Beckingham
3133616b67 Unit tests
- Enabled some disabled regex filter tests.
2012-02-26 10:57:59 -05:00
Owen Clarke
7c2d97d939 Unit Tests
- Fixed 'witching hour' bug in unit tests that causes problems when run
  in assorted time zones.  By using str2time to get the epoch value of
  a known local time, this should fix failures that occur.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-02-25 23:13:41 -05:00
Owen Clarke
049f34d339 Portability
- Improved run_all script to run on Solaris.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-02-25 23:10:11 -05:00
Paul Beckingham
e0aabe08bf Unit Tests
- Fixed broken DOM tests.
2012-02-24 18:26:35 -05:00
Owen Clarke
8e5afa0d8a Bug #936
- Fixed failing tests on Solaris.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-02-23 20:16:39 -05:00
Owen Clarke
ed6bdd7bdc Bug #936
- Fixed failing tests on Solaris.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-02-23 20:13:44 -05:00
Owen Clarke
3b9a737ac4 Bug #936
- Fixed failing tests on Solaris.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-02-23 19:58:42 -05:00
Paul Beckingham
15a0d7a801 Bug #880
- Fixed bug #880, which listed the wrong file paths for themes (thanks to Peter
  Lewis).
2012-02-23 17:26:52 -05:00
Paul Beckingham
39998d5cc5 Bug #932
- Fixed bug #932, which fixed change propagation for recurring tasks (thanks to
  Jennifer Cormier).
- Added unit tests, corrected some.
2012-02-20 17:25:31 -05:00
Paul Beckingham
9f8165e3c6 Bug #932 (part 1)
- Fixed bug that caused only parent recurring tasks to have their attributes
  properly removed.
- When duplicating a parent recurring task, a new recurring parent task is
  created.  When a child recurring task is duplicated, a plain task is created.
- Added unit tests.
- Thanks to Jennifer Cormier.
2012-02-20 01:10:42 -05:00
Paul Beckingham
7a45db4d0f Feature #891
- Added feature #891, which allows for leftmost partial matches of UUID values.
  Makes direct comparisons for full-length values, and regular expressions for
  partial values.  Note that there is a minimum length of 8 hex digits.
- Added safety parsing mechanism that fails a partial UUID if immediately
  followed by a hex digit.  This allows for numbers longer than 8 digits to not
  be misinterpreted as a UUID.
- Implemented Nibbler::getPartialUUID.
- Implemented unit tests.
@@ -1145,12 +1145,23 @@ const A3 A3::sequence (const A3& input) const

   for (unsigned int i = 0; i < uuids.size (); ++i)
   {
-    if (ids.size ())
+    if (ids.size () + i > 0)
       sequenced.push_back (Arg ("or", Arg::cat_op));

-    sequenced.push_back (Arg ("uuid",        Arg::type_string, Arg::cat_dom));
-    sequenced.push_back (Arg ("=",                             Arg::cat_op));
-    sequenced.push_back (Arg (uuids[i],      Arg::type_string, Arg::cat_literal));
+    // A full-length UUID requires a string comparison.
+    if (uuids[i].length () == 36)
+    {
+      sequenced.push_back (Arg ("uuid",         Arg::type_string, Arg::cat_dom));
+      sequenced.push_back (Arg ("=",                              Arg::cat_op));
+      sequenced.push_back (Arg (uuids[i],       Arg::type_string, Arg::cat_literal));
+    }
+    // A UUID fragment is a leftmost comparison.
+    else
+    {
+      sequenced.push_back (Arg ("uuid",         Arg::type_string, Arg::cat_dom));
+      sequenced.push_back (Arg ("~",                              Arg::cat_op));
+      sequenced.push_back (Arg ("^" + uuids[i], Arg::type_string, Arg::cat_rx));
+    }
   }

   sequenced.push_back (Arg (")", Arg::cat_op));
@@ -1674,11 +1685,11 @@ bool A3::is_uuid (Nibbler& n, std::string& result)
   n.save ();
   result = "";
   std::string uuid;
-  if (n.getUUID (uuid))
+  if (n.getPartialUUID (uuid))
   {
     result += uuid;
     while (n.skip (',') &&
-           n.getUUID (uuid))
+           n.getPartialUUID (uuid))
     {
       result += ',' + uuid;
     }
@@ -1997,13 +2008,13 @@ bool A3::extract_uuid (
   Nibbler n (input);

   std::string uuid;
-  if (n.getUUID (uuid))
+  if (n.getPartialUUID (uuid))
   {
     sequence.push_back (uuid);

     while (n.skip (','))
     {
-      if (!n.getUUID (uuid))
+      if (!n.getPartialUUID (uuid))
         throw std::string (STRING_A3_UUID_AFTER_COMMA);

       sequence.push_back (uuid);
2012-02-19 22:27:40 -05:00
Paul Beckingham
c785836083 Feature #632
- Added feature #632, which allows environment variables TASKRC and TASKDATA
  to override .taskrc and .task directory locations (thanks to Steve Rader).
- Added unit tests.
+
2012-02-19 18:59:28 -05:00
Paul Beckingham
26cc4e11f5 Unit Tests
- Improved verbosity unit tests.
2012-02-13 06:16:18 -05:00