Commit graph

2708 commits

Author SHA1 Message Date
Paul Beckingham
9fefd4f283 TDB2
- Converted 'edit' command to TDB2.
2011-08-30 00:21:56 -04:00
Paul Beckingham
7f1e517754 Bug
- Added missing TDB2::commit call to commands that handleRecurrence.
  The missing commit would have meant no updates to the data when
  recurring tasks are generated.
2011-08-30 00:15:40 -04:00
Paul Beckingham
32164680ab TDB2
- Converted 'summary' command to TDB2.
2011-08-30 00:14:07 -04:00
Paul Beckingham
c340520bcc TDB2
- Converted 'ids', '_ids' and '_zshids' to TDB2.
2011-08-30 00:06:48 -04:00
Paul Beckingham
dde399f765 TDB2
- Converted 'burndown.{m,d,y}' to TDB2.
2011-08-30 00:00:23 -04:00
Paul Beckingham
77b647dfb0 TDB2
- Converted 'stop' command to TDB2.
2011-08-29 23:57:13 -04:00
Paul Beckingham
c72a556492 TDB2
- Converted 'start' command to TDB2.
2011-08-29 23:51:22 -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
5276bfd473 TDB2
- Converted 'export' to TDB2.
2011-08-29 21:12:23 -04:00
Paul Beckingham
380aadd76a Unit Tests
- The export.yaml.t test now verifies env access to task.
2011-08-28 18:16:43 -04:00
Paul Beckingham
1a4916ff03 Unit Tests
- Corrected PATH in env command.
2011-08-28 17:45:28 -04:00
Paul Beckingham
de5bee4353 Bug
- Import was not properly handling tags as a JSON array.  It assumed it
  was a string.
- Modified roundtrip.t tests so they work.
2011-08-28 17:21:49 -04:00
Paul Beckingham
6ab7cec36c Unit Tests - export-yaml.pl
- Rewrote the unit tests for the old export.yaml command to use the
  new export-yaml.pl add-on.
2011-08-28 16:53:49 -04:00
Paul Beckingham
4d328a1e46 Bug - Exec
- The execute command was not putting spaces between combined arguments
  when constructing a command line.
2011-08-28 16:44:31 -04:00
Paul Beckingham
aace091329 Add-ons: Exports
- Modified the export scripts to use the right command, which is now
  'export', not '_query', although '_query' is now an alias for backward
  compatibility.
2011-08-28 16:43:12 -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
0f627bd44e TDB2
- Added TDB2::clear and TF2::clear methods.
2011-08-28 08:13:41 -04:00
Paul Beckingham
8ec130d3c0 Command: info
- Converted to use TDB2.
2011-08-28 00:18:56 -04:00
Paul Beckingham
0dd4e6d360 Command: count
- Now generates recurring tasks.
- Cleaned up unit tests.
2011-08-28 00:17:51 -04:00
Paul Beckingham
eeb6479440 Command: Statistics
- Modified implementation to make better use of TDB2 features, and
  remove a set of static strings.
2011-08-28 00:16:24 -04:00
Paul Beckingham
50fa2c0ddf TDB2
- Every task in pending.data an ID.
2011-08-28 00:02:15 -04:00
Paul Beckingham
1e70f00c29 TDB2
- Properly handles cases where tasks are added, then existing data files
  are loaded.  The 'add' list and the 'loaded' list needed to be merged.
2011-08-27 23:30:51 -04:00
Paul Beckingham
1b25c415b0 TDB2
- Converted _urgency command from tdb to tdb2.
2011-08-27 21:24:36 -04:00
Paul Beckingham
c23f663408 TDB2
- Fixed problem with backlog - TDB2::modify should call backlog.add_task
  but was calling backlog.modify_task.
2011-08-27 20:56:41 -04:00
Paul Beckingham
d22871b265 Import
- Added unit tests for the 'import' command, which uses JSON as the
  native format.  This is the new default import/export format.  All
  other import/export formats are (to be) implemented as transforms
  to JSON.
2011-08-27 18:42:08 -04:00
Paul Beckingham
0eec42ce4a TDB2
- Corrected maintenance of the _lines vector during TDB2::add_line.
- Implemented TDB2::modify_task undo maintenance.
- Added unit tests for TDB2.  Which fail.
2011-08-27 16:33:19 -04:00
Paul Beckingham
ab931b6af2 Legacy
- Added legacy warnings about use of fg: or bg:.
2011-08-27 14:29:08 -04:00
Paul Beckingham
1c98544380 Columns - 'fg' and 'bg'
- Added columns 'fg' and 'bg', despite their being deprecated.  Can't
  remove capabilities without appropriate forewarning.
2011-08-27 11:56:03 -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
1392c8e619 Typo
- Wrong variable name.  Should have run the tests first.
2011-08-27 10:46:49 -04:00
Paul Beckingham
df2a319201 Enhancement
- The 'stats' command now includes the new data files in the 'data size'
  calculation.
2011-08-27 10:39:21 -04:00
Paul Beckingham
bceccba6eb Code Cleanup
- The str_replace is no longer needed.
2011-08-27 10:38:48 -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
1c2a4981ac Helper functions
- Rescued the str_replace function from Att.
2011-08-27 10:22:40 -04:00
Paul Beckingham
e5acabc452 Helper functions
- Rescued the ::encode and ::decode funtions and put them in util.cpp.
  This is because 2.0 will still need to perform the same encode/decode
  operations without Att.cpp around.
2011-08-27 10:21:49 -04:00
Paul Beckingham
f92b13fbf7 Visuals
- Cleaned up 'info' command output when the task is not pending and
  has no ID.  It displays '-' instead of the misleading "0".
2011-08-26 02:41:51 -04:00
Paul Beckingham
64be6e1cf4 Unit Tests
- Added unit tests for bug 819, on behalf of Matt Kraai.
- Created a new, single test for cleanup that replaces 6.  It's makes
  for shorter unit tests, and adds less test count inflation.  Over
  time, all tests should be modified in a similar way.  This will
  probably cut the total number of unit tests in half, but that's not
  the important metric.
2011-08-26 02:13:32 -04:00
Matt Kraai
ea3f0e8567 Bug #819
- Patch applied to fix problem with parsing, where this:
    aa'a
  is parsed as
    aa 'a

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2011-08-26 02:00:41 -04:00
Paul Beckingham
e127f33e3a TDB2::siblings
- TDB2 helper function to locate sibling tasks.
2011-08-26 01:58:07 -04:00
Paul Beckingham
4f0276c062 DOM
- Implemented lookup for <id>.<attr> and <uuid>.<attr>.
2011-08-25 22:19:25 -04:00
Paul Beckingham
60ca284e3a TDB2::get
- Implemented high-level accessors for tasks, by ID and UUID.  This
  permits full DOM implementation.
2011-08-25 22:13:47 -04:00
Paul Beckingham
dab06f8672 Code Cleanup
- All objects now use the same convention for naming members.  The
  consistency is a good thing.
2011-08-25 21:54:28 -04:00
Paul Beckingham
fb6dc5058f TDB2
- Full implementation of TDB2::add, which includes pending/completed, undo
  and backlog.
- Removed obsolete TF2::commitUndo, which is no longer necessary.
- Added File::truncate method, to allow a TDB2 shortcut.
2011-08-25 00:29:54 -04:00
Paul Beckingham
02df3853f7 Unit Tests
- Fixed more unit tests that were out of synch with the latest
  functionality, text messages or rendering.
2011-08-24 00:47:44 -04:00
Paul Beckingham
6f38e10cab Feature #682
- Added feature #682, which allows the configuration variable 'defaultheight'
  to override the assumed height of 24 lines when 'detection' is not enabled
  (thanks to Steve Rader).
2011-08-23 23:29:36 -04:00
Paul Beckingham
397d1c2d09 Feature #806
- Added feature #806, which provides the ability to compare dates using the
  relational operator '>=' (thanks to Miguel de Val Borro).
2011-08-23 23:01:56 -04:00
Paul Beckingham
257f5ab3da Bug #458
- Fixed bug #458, removing the ambiguous 'm' as a duration, leaving 'mi[nutes]'
  and 'mo[nths]' requiring at least two characters for a match.
2011-08-23 22:46:32 -04:00
Paul Beckingham
d15cccdb7d Bug #694
- Fixed bug #694, which allows attributes to be modified while annotating a
  task (thanks to Aikido Guy).
2011-08-23 22:30:01 -04:00
Paul Beckingham
2f60bdf9d0 Bug #720
- Fixed bug #720, so that when the 'info' report renders total active time,
  it uses a lossless format (thanks to Bernhard B).
2011-08-23 22:15:00 -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