Commit graph

81 commits

Author SHA1 Message Date
Paul Beckingham
8e34a02811 Task Validation
- Implemented more relaxed validation rules.
- Added quiet corrections for missing data.
2011-08-31 01:15:12 -04:00
Paul Beckingham
f14b414b9c Code Cleanup
- Eliminated obsolete composeYAML and composeCSV methods.  With export
  capabilities moving outside the core, these are no longer needed.
2011-08-29 21:33:34 -04:00
Paul Beckingham
28183711c4 Bug
- The export command included the value of date fields instead of the
  name of date fields.
2011-08-28 16:39:05 -04:00
Paul Beckingham
17dfbabb39 TDB2 & Task
- Fixed next_id handling in load_tasks.
- Removed unnecessary load in next_id.
- Added missing encode call.
index 8c0d2e9..3d1b7ce 100644
--- a/src/Task.cpp
+++ b/src/Task.cpp
@@ -528,7 +528,7 @@ std::string Task::composeF4 () const
     {
       ff4 += (first ? "" : " ")
            + it->first
-           + ":\"" + json::encode (it->second) + "\"";
+           + ":\"" + encode (json::encode (it->second)) + "\"";
       first = false;
     }
   }
2011-08-27 11:18:43 -04:00
Paul Beckingham
74c12e1dec Encode/Decode
- The tasks are now using JSON encodings, but in addition to JSON
  decodings, also need legacy decoding, providing backward compatibility.
2011-08-27 10:31:27 -04:00
Paul Beckingham
89d3b4e805 Bug #737
- Fixed bug #737, which allows wait dates after due dates, but provides a
  warning (thanks to Arkady Grudzinsky).
2011-08-23 21:36:09 -04:00
Paul Beckingham
9a126ce717 Error Handling
- Improved some task validation errors by including data.
- Improved the phrasing of some error to be less pompous.
- Marked validation errors that need to be downgraded to warnings.
2011-08-21 12:35:47 -04:00
Paul Beckingham
be0522d567 Annotation Collisions
- Annotation timestamps are now incremented until unique.  This prevents
  rapid, successive annotations colliding.  The kind that occur during
  unit tests and when using UI wrapper programs.
- Removed 'sleep' commands in unit tests that were added to circumvent
  this.  This speeds up the test suite somewhat.
2011-08-13 21:53:10 -04:00
Paul Beckingham
bfad448f82 TDB2 - id <--> uuid mapping
- Migrated TDB mapping over to TDB2 mapping, which occurs at the TF2 level.
  This should (soon) restore task dependencies.
2011-08-13 17:43:07 -04:00
Paul Beckingham
e238b94d1b Urgency
- Urgency recalc was not properly set with the task was modified.
- Corrected urgency formatting.
- Cleaned up some code in A3 and E9.
2011-08-12 23:08:54 -04:00
Paul Beckingham
e2a8f85a2f Task Refactoring
- Task is no longer a map of string to Att.  Att is itself a name/
  value pair, so the name was redundant.  Task is now a map of string
  to string.  This brings the obsoletion of Att much closer.
2011-08-07 22:41:25 -04:00
Paul Beckingham
6f980490bd Code Cleanup
- Merging Record and Task objects, step 4.
2011-08-07 17:03:39 -04:00
Paul Beckingham
740cacc49f Code Cleanup
- Merging Record and Task objects, step 3.
2011-08-07 16:40:02 -04:00
Paul Beckingham
33cfdec5a6 Code Cleanup
- Merging Record and Task objects, step 2.
2011-08-07 16:28:40 -04:00
Paul Beckingham
6d00337db3 Code Cleanup
- Merging Record and Task objects, step 1.
2011-08-07 16:23:23 -04:00
Paul Beckingham
cdda791c84 Command - import
- Implemented the import command, which only suports JSON.  It is
  the basis for all other import formats, which will be implemented
  as external scripts.
2011-08-07 02:10:50 -04:00
Paul Beckingham
7fbe124fe0 Unit Tests
- Added proper handling for when no command or filter is specified, and
  no rc.default.command exists.
- Improved wording on above error message.
- Fixed typo in previous commit (managed to check in code before the
  build completed, and ultimately failed).
- Now reports errors that occur during initialization at the same level
  of verbosity as during command execution.
2011-07-16 15:33:09 -04:00
Paul Beckingham
2135cb141d Task Validation
- Shifted test for priority values from Att.cpp to Task.cpp.
2011-07-16 14:22:12 -04:00
Paul Beckingham
8827f9c978 TDB2
- Implemented CmdAdd.cpp and CmdLog.cpp using TDB2.
- Implemented simple append writes in TDB2.
- Modified CmdImport to accept and parse JSON.
- Added more const-ness in DOM, Expression and Task, to allow TDB2::get_tasks
  to return a const vector ref, which is a Very Good Thing.
- Corrected usage for the export command.
- Implemented Task::urgency as a call to Task::urgency_c, which is a const
  overload to allow urgency calculations (without caching) for const Task
  objects.
- Removed obolete code from TDB.
- Added lots of diagnostic output for TDB2 - it's annoying, but will be
  gone soon.
- Added mention in CmdHelp of the new <filter> and <modifications>
  syntax elements.  Needs more.
- Added Command::filter overload which uses TDB2.  Not in use yet.
2011-07-13 23:53:57 -04:00
Paul Beckingham
8e0296468e Unit Tests
- Improved args.5.t, which was attempting to stop tasks that were
  not started.
2011-07-10 18:04:49 -04:00
Paul Beckingham
ba723db9d7 Helpers
- Implemented Task::setEnd.
- Updated all code to use Task::setEntry and Task::setEnd.
2011-07-10 11:07:00 -04:00
Paul Beckingham
f0d2af2651 Filter Bugs
- A substitution arg is categorized as "subst", but was tested for
  "substitution".
- The Arguments::is_multipart method was triggering on '/', which is
  wrong, but I can't remember why I put it in there.  Hmmm.
- When extracting a write-filter, substitutions after the command
  were generating an error, whereas they should be ignored.
- Task::substitute was modifying data even when the patterns were not
  matching.  Yikes.
- Added unit tests for en-passant modification of all types during
  done, delete, start, stop.
2011-07-10 01:03:52 -04:00
Paul Beckingham
2d4ee13a46 Urgency
- Broke out urgency into separate functions.
2011-07-04 00:28:44 -04:00
Paul Beckingham
63f91c2f88 Enhancement
- Implemented Record::get_date to eliminated the need to obtain a date
  as a string, then convert to time_t, then instantiate a Date.
2011-07-01 22:13:34 -04:00
Paul Beckingham
7d5f4fdfc7 I18N
- Localized Task.cpp
2011-07-01 21:50:23 -04:00
Paul Beckingham
877ecbc864 Commands - done
- The 'done' command now functional.
- Localized CmdDone.cpp.
2011-06-26 23:28:21 -04:00
Paul Beckingham
b58438bdd4 Regexes
- Added regex support to substirutions.
- Fixed bug that prevented 1.9.4 from shipping with regexes.  If the
  description is "aXXaaXXa", and the substitution is /XX/.../ then the
  first substitutions changes the length of the string to "a...aaXXa"
  and therefore invalidates the index for the second match, and makes
  this change: "a...a...Xa".  The fix is to keep a running 'skew' count
  of the difference in 'from' and 'to' length, to adjust the match
  indexes.
- Moved the helper deltaSubstitutions function into the Task object,
  which makes more sense.
- Cleaned up output composition for CmdAdd.
- Eliminated #ifdef FEATURE_REGEX.  They are here to stay.
2011-06-25 16:41:17 -04:00
Paul Beckingham
61e549c80c Code Cleanup
- Removed many more uses of the 'foreach' macro.
2011-06-04 23:02:18 -04:00
Paul Beckingham
690fa6e206 JSON
- Replaced old Tree-based parser with a faster, leaner parser.
  Currently lacking good error handling and a large test suite.
- Integrated new parser into Task object, for encode/decode.
- Replicated same basic unit tests.  Needs more.
- Fixed bug in handleShell that failed to call the new Context::initialize2.
- Removed debugging code from CmdInstall.
- Implemented format() that does not require width and precision args.
2011-05-20 00:18:36 -04:00
Paul Beckingham
3d69f70d66 Bug
- Lack of Task default constructor, copy constructor and operator=
  implementation details caused tasks stored in an STL container to
  lose their cached urgency value.
- Info report now specifically formats urgency values, whereas the
  default formatting adds justification spacing.
2011-05-13 17:54:08 -04:00
Paul Beckingham
f05fedfc7a Urgency
- Set initial urgency value to zero.
2011-05-08 11:04:57 -04:00
Paul Beckingham
041bcfdf21 Custom Reports
- Integrated new View in place of Table for all custom reports.
- Implemented legacy field mapping for columns and sort fields.
- Implemented rc.indent.report.
- Implemented rc.row.padding.
- Implemented rc.column.padding.
- Implemented rc.color.label.
- Modified default rc.indent.annotation from 1 to 2.
- Implemented urgency value caching.
- Implemented View truncation by line and row.
- Columns now know which report thy belong to, so they can use the
  rc.report.<report>.dateformat override.
- Assorted bugs remain.
2011-05-08 09:29:55 -04:00
Paul Beckingham
f183201f6f Export
- Added the ability to include the ID in _query command results.
2011-04-23 21:13:57 -04:00
Paul Beckingham
40b2258589 Bug 707
- urgency.blocked.coefficient logic was inverted.
2011-04-08 00:42:00 -04:00
Paul Beckingham
18aa5c5b69 JSON
- Tags are now a JSON array:  "tags":["one","two"]
2011-01-25 23:17:28 -05:00
Paul Beckingham
eaf184c833 Bug
- The _query command now generates JSON with the string entities
  properly encoded.
2011-01-23 00:08:47 -05:00
Paul Beckingham
68fe437889 Taskd
- Modified Task::composeJSON to use ISO 8601 date format, and the new
  hierarchical annotation format.
2011-01-11 00:07:11 -05:00
Paul Beckingham
462caf5bd4 Copyright
- Updated copyright to 2011.
2010-12-31 22:03:05 -05:00
Paul Beckingham
4a58fbdd53 Merge branch '1.9.4' of tasktools.org:task into 1.9.4 2010-12-27 00:24:30 -05:00
Paul Beckingham
3d7bb9d253 Bug #564
- Fixed bug #564, which allowed the deletion of parent recurring tasks (thanks
  to Peter De Poorter).
2010-12-27 00:22:57 -05:00
Paul Beckingham
7f32435ce9 Helper Command
- Added _query helper command for script writers, which accepts a filter like
  any other report, but returns raw JSON.
2010-12-26 10:00:41 -05:00
Paul Beckingham
488b23f42f Bug
- Flipped the test and error message for wait dates that must be before due
  dates.
2010-10-25 00:37:56 -04:00
Paul Beckingham
0a5e380bbf Correction
- Committed too many chunks in the last modification.
2010-10-23 11:29:20 -04:00
Paul Beckingham
5d4cafb7a6 Bug #493
- Not a fix for the bug, but improved task consistency checking.  The
  real fix can only be made when the Task::waiting status is abolished.
2010-10-05 00:39:22 -04:00
Paul Beckingham
199114abcd Dependencies
- Improved error message when entering "task 1 dep:2; task 1 dep:2".
- Documented circularity checking.
- Stubbed dependencyChainBroken ().
- Stubbed dependencyNag ().
- Improved existing unit tests, added more.
2010-08-27 17:19:15 -04:00
Paul Beckingham
0e2c090dc5 Dependencies
- Added check for circular dependencies.
2010-08-26 22:52:57 -04:00
Paul Beckingham
44fe227595 Product Name Change
- Converted all (appropriate) uses of 'task' to 'taskwarrior'.
2010-08-21 12:31:00 -04:00
Paul Beckingham
6dd4067167 Unit Tests - urgency
- Implemented unit tests for calculating urgency.
2010-08-07 00:15:46 -04:00
Paul Beckingham
d8544181ce Feature - Urgency
- Implemented the urgency algorithm according to rfc31.
- Added a new '_urgency' command to test the algorithm.
2010-08-06 19:04:01 -04:00
Paul Beckingham
b050d67ba9 Dependencies
- Added TDB::gc code to remove dangling dependencies.
2010-08-04 00:43:38 -04:00