Commit graph

6231 commits

Author SHA1 Message Date
Rosen Penev
cc6826fc3a [clang-tidy] Remove redundant init
Found with modernize-use-default-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
54e40008c9 [clang-tidy] Convert 0/1 to false/true
Found with modernize-use-bool-literals

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
0344856d65 [clang-tidy] Switch C headers to C++ ones
Found using modernize-return-braced-init-list

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
e46039efb1 [clang-tidy] Pass by value with std::move
Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
6cd15235be [clang-tidy] Access static member through qualified-id
Found readability-static-accessed-through-instance

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
37b641259c [clang-tidy] Add const references where useful
Found with performance-for-range-copy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
defd49b13d [clang-tidy] Add const where it makes sense
Found with readability-redundant-string-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
bf40ea8816 [clang-tidy] Use default to initialize constructors
Found with modernize-use-equals-default

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
897759e4dc [clang-tidy] Replace push_back with emplace_back
Found with modernize-use-emplace

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
a468537c1b [clang-tidy] Use new range based loops
Found with modernize-loop-convert

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
6ce2a129dd [clang-tidy] Use auto where the type is known
Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
a331cceded [clang-tidy] Use .empty instead of comparing size
Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Tomas Babej
d43fa66489 CmdPurge: Detect the failure mode of trying to purge non-deleted tasks
Prompted by the failure mode described by Glen Solsberry in #2254.
2020-12-05 14:31:27 -05:00
Julien Rabinow
e37d932208 bump libshared submodule version 2020-12-05 14:30:58 -05:00
Max Rossmannek
3d850715f4 Make virtual tags consistent across commands.
- the DUETODAY tag was deprecated in b2d49f397
- the QUARTER tag was added in 630a1530e and 4711dd9e1
- the PROJECT, PRIORITY and LATEST tags were added in 4008a64

Note: the documentation in the man page is already up-to-date.

Fixes #2359
2020-12-03 01:45:07 -05:00
Max Rossmannek
09e2cb46d6 Simplify task construction 2020-11-30 01:01:26 -05:00
Max Rossmannek
44bcd58051 Fix Undo command
The Undo command broke in 48dff11 when the `onModify` hook got added to
its execution in order to fix #2213. The reason for it begin broke is
that a Task object is created in an unsafe manner because the `prior`
task may be empty.
Catching this case fixes the bug.
2020-11-30 01:01:26 -05:00
Tomas Babej
a09f9d48ab Update copyright to 2020 2020-11-21 12:27:05 -05:00
HTunne
75c0e41fcc Make modify and delete commands respect rc.recurrence.confirmation config option. 2020-11-21 12:26:41 -05:00
Michał Mirosław
7b2e68d176 Fix parsing of "PnM" recurrence periods
Due to not accounting for the leading "P", getNextRecurrence would always return the same datetime, breaking all generic "PnM" periods and leading to an infinite loop in generateDueDates.
2020-11-17 10:52:47 -05:00
Martin Michlmayr
174507e7ad Fix typos 2020-11-17 10:41:13 -05:00
javabird25
81183ae7d1 Fix SIGSEGV when substituting sequence with shorter one 2020-11-17 10:40:38 -05:00
Tomas Babej
6727d08da0
Context: Do not set new-uuid by default
This reverts part of f6b2a6541c, which
(likely accidentally) re-introduced the new-uuid verbosity setting as a
default.
2020-09-18 21:33:54 -04:00
Tomas Babej
6bfb275dcc
CmdAdd: Make sure a UUID is printed if ID does not exist
This fixes a regression was introduced in
4e80d5d5fd.

Currently, if a user (with default configuration) adds a completed or
deleted task, they do not get a confirmation message ("Created task
..."). This is due to the fact that:
a) new-uuid is not set by default
b) new-id is set by default, but only prints message if the added task
   is in pending or waiting state

Make sure to print a message containing UUID reference if the newly
added task is in completed or deleted state.
2020-09-18 21:10:59 -04:00
Jochen Sprickerhof
48dff115c2 hook onModify into task undo (Closes: #2213) 2020-03-12 10:42:52 -04:00
timbuntu
938e9130d6 Fixed report colors in calendar 2020-03-12 10:38:03 -04:00
Chad Phillips
cd62e65a13 JSON encode/decode string UDAs
Previously, multiline string UDAs were not preserved when editing
a task via 'task X edit'. String UDAs are now JSON encoded/decoded
during the edit cycle to allow preservation of multiline
2019-04-14 19:34:57 -04:00
mrossinek
6fbd400e77 Fix #1999 2019-03-02 19:44:18 -05:00
mrossinek
16d967ad01 Add missing newline 2019-03-02 19:43:13 -05:00
mrossinek
254e737e00 Fix #2002 2019-03-02 19:43:13 -05:00
Janik Rabe
f6b2a6541c Fix rc.verbose documentation in taskrc(5) 2019-02-14 08:02:58 -05:00
taiyu
fd441bdd62 increase cli priority, respect override verbosity. 2019-02-07 08:41:25 -05:00
taiyu
d2b1662a39 Simplify CLI2::get* methods. allow rc=... 2019-02-07 08:41:25 -05:00
taiyu
8514071f19 applyOverrides: add messages after overrides 2019-02-07 08:41:25 -05:00
Janik Rabe
a8acff9f7f CmdHistory: repeat unit if a larger unit changes
In history and ghistory commands, repeat the smaller units when a larger unit
changes.  For example, if January 2019 is displayed immediately after January
2018, re-show the "January" label instead of only showing the year change.
2019-02-07 08:33:09 -05:00
Paul Beckingham
8df69597f6 Update sort.cpp 2019-02-07 08:20:14 -05:00
Paul Beckingham
32d14bc085 Update sort.cpp 2019-02-07 08:20:14 -05:00
Paul Beckingham
803f4a5017 Update CmdProjects.cpp 2019-02-07 08:20:14 -05:00
mrossinek
6a8beed7f5 Extract project sorting function 2019-02-07 08:20:14 -05:00
mrossinek
7cb341ee05 Extend bug fix of #1917 to summary command 2019-02-07 08:20:14 -05:00
mrossinek
f5cd9cde05 Properly sort projects into an ordered list in project command 2019-02-07 08:20:14 -05:00
mrossinek
28974cd794 Extend bug fix of #1917 to summary command 2019-02-07 08:20:14 -05:00
mrossinek
54a57e9954 Fix bug #1917 (previously known as TW-1904) 2019-02-07 08:20:14 -05:00
Laurence
f580cc5f6f Update description of command uuids 2019-02-04 12:30:23 +01:00
Paul Beckingham
6fcbe2efbd
Merge pull request #2080 from corbolais/2.6.0
add (shortened) ID column to timesheet output
2019-01-02 08:03:50 -05:00
Paul Beckingham
24943a441d
Merge pull request #2076 from djmitche/task-decode-comment
Docs: make comment on Task::decode match reality
2019-01-02 08:02:58 -05:00
Paul Beckingham
660b7c09af
Merge pull request #2095 from tbabej/test_fixes
TW-1511: Interpret string subtraction as concanetation with a dash
2019-01-02 08:02:12 -05:00
Tomas Babej
bf2cd0f5e4 TW-1511: Interpret string subtraction as concanetation with a dash
Fixes #1537 (previously known as TW-1511).
2019-01-01 21:56:06 -05:00
Tomas Babej
8066e4e6e2 meta: Update copyright year 2019-01-01 08:46:21 -05:00
Tomas Babej
b5d7845c6d libshared: Update submodule 2019-01-01 08:45:37 -05:00