mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
validate: autoAdjust checks for the hint
This commit is contained in:
parent
283e0a5a21
commit
93aff67ee0
1 changed files with 8 additions and 4 deletions
|
@ -86,11 +86,18 @@ static void autoFill (
|
||||||
// recorded data.
|
// recorded data.
|
||||||
//
|
//
|
||||||
static void autoAdjust (
|
static void autoAdjust (
|
||||||
|
const CLI& cli,
|
||||||
const Rules& rules,
|
const Rules& rules,
|
||||||
Database& database,
|
Database& database,
|
||||||
const Interval& filter,
|
const Interval& filter,
|
||||||
Interval& interval)
|
Interval& interval)
|
||||||
{
|
{
|
||||||
|
if (findHint (cli, ":adjust"))
|
||||||
|
{
|
||||||
|
// An empty filter allows scanning beyond interval.range.
|
||||||
|
Interval range_filter;
|
||||||
|
auto tracked = getTracked (database, rules, range_filter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -134,10 +141,7 @@ void validate (
|
||||||
filter.range = Range (Datetime ("today"), Datetime ("tomorrow"));
|
filter.range = Range (Datetime ("today"), Datetime ("tomorrow"));
|
||||||
|
|
||||||
autoFill (cli, rules, database, filter, interval);
|
autoFill (cli, rules, database, filter, interval);
|
||||||
|
autoAdjust (cli, rules, database, filter, interval);
|
||||||
if (findHint (cli, ":adjust"))
|
|
||||||
autoAdjust (rules, database, filter, interval);
|
|
||||||
|
|
||||||
warnOnNewTag (rules, database, interval);
|
warnOnNewTag (rules, database, interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue