TW-1313: some recurring intervals reset due time to midnight
- Thanks to James Dietrich.
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -277,3 +277,4 @@ suggestions:
|
|||||||
Ander
|
Ander
|
||||||
Naga Kiran
|
Naga Kiran
|
||||||
David Badura
|
David Badura
|
||||||
|
James Dietrich
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
(thanks to Ben Boeckel).
|
(thanks to Ben Boeckel).
|
||||||
- TW-311 Estimated completion in burndown.daily shows impossible results
|
- TW-311 Estimated completion in burndown.daily shows impossible results
|
||||||
(thanks to Michele Santullo).
|
(thanks to Michele Santullo).
|
||||||
|
- TW-1313 some recurring intervals reset due time to midnight
|
||||||
|
(thanks to James Dietrich).
|
||||||
- TW-1446 Difference in how relative dates are specified in report filters since 2.3.0
|
- TW-1446 Difference in how relative dates are specified in report filters since 2.3.0
|
||||||
(thanks to atomicules).
|
(thanks to atomicules).
|
||||||
- TW-1703 When on-modify hook is installed, some messages print UUIDs
|
- TW-1703 When on-modify hook is installed, some messages print UUIDs
|
||||||
|
|||||||
@@ -166,9 +166,8 @@ bool generateDueDates (Task& parent, std::vector <ISO8601d>& allDue)
|
|||||||
// Determine due date, recur period and until date.
|
// Determine due date, recur period and until date.
|
||||||
ISO8601d due (parent.get_date ("due"));
|
ISO8601d due (parent.get_date ("due"));
|
||||||
if (due._date == 0)
|
if (due._date == 0)
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
std::string recur = parent.get ("recur");
|
std::string recur = parent.get ("recur");
|
||||||
|
|
||||||
bool specificEnd = false;
|
bool specificEnd = false;
|
||||||
@@ -215,6 +214,9 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period)
|
|||||||
int m = current.month ();
|
int m = current.month ();
|
||||||
int d = current.day ();
|
int d = current.day ();
|
||||||
int y = current.year ();
|
int y = current.year ();
|
||||||
|
int ho = current.hour ();
|
||||||
|
int mi = current.minute ();
|
||||||
|
int se = current.second ();
|
||||||
|
|
||||||
// Some periods are difficult, because they can be vague.
|
// Some periods are difficult, because they can be vague.
|
||||||
if (period == "monthly" ||
|
if (period == "monthly" ||
|
||||||
@@ -229,7 +231,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period)
|
|||||||
while (! ISO8601d::valid (m, d, y))
|
while (! ISO8601d::valid (m, d, y))
|
||||||
--d;
|
--d;
|
||||||
|
|
||||||
return ISO8601d (m, d, y);
|
return ISO8601d (m, d, y, ho, mi, se);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (period == "weekdays")
|
else if (period == "weekdays")
|
||||||
@@ -259,7 +261,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period)
|
|||||||
while (! ISO8601d::valid (m, d, y))
|
while (! ISO8601d::valid (m, d, y))
|
||||||
--d;
|
--d;
|
||||||
|
|
||||||
return ISO8601d (m, d, y);
|
return ISO8601d (m, d, y, ho, mi, se);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (period[0] == 'P' &&
|
else if (period[0] == 'P' &&
|
||||||
@@ -294,7 +296,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period)
|
|||||||
while (! ISO8601d::valid (m, d, y))
|
while (! ISO8601d::valid (m, d, y))
|
||||||
--d;
|
--d;
|
||||||
|
|
||||||
return ISO8601d (m, d, y);
|
return ISO8601d (m, d, y, ho, mi, se);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (Lexer::isDigit (period[0]) && period[period.length () - 1] == 'q')
|
else if (Lexer::isDigit (period[0]) && period[period.length () - 1] == 'q')
|
||||||
@@ -311,7 +313,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period)
|
|||||||
while (! ISO8601d::valid (m, d, y))
|
while (! ISO8601d::valid (m, d, y))
|
||||||
--d;
|
--d;
|
||||||
|
|
||||||
return ISO8601d (m, d, y);
|
return ISO8601d (m, d, y, ho, mi, se);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (period == "semiannual" ||
|
else if (period == "semiannual" ||
|
||||||
@@ -327,7 +329,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period)
|
|||||||
while (! ISO8601d::valid (m, d, y))
|
while (! ISO8601d::valid (m, d, y))
|
||||||
--d;
|
--d;
|
||||||
|
|
||||||
return ISO8601d (m, d, y);
|
return ISO8601d (m, d, y, ho, mi, se);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (period == "bimonthly" ||
|
else if (period == "bimonthly" ||
|
||||||
@@ -343,7 +345,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period)
|
|||||||
while (! ISO8601d::valid (m, d, y))
|
while (! ISO8601d::valid (m, d, y))
|
||||||
--d;
|
--d;
|
||||||
|
|
||||||
return ISO8601d (m, d, y);
|
return ISO8601d (m, d, y, ho, mi, se);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (period == "biannual" ||
|
else if (period == "biannual" ||
|
||||||
@@ -352,7 +354,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period)
|
|||||||
{
|
{
|
||||||
y += 2;
|
y += 2;
|
||||||
|
|
||||||
return ISO8601d (m, d, y);
|
return ISO8601d (m, d, y, ho, mi, se);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (period == "annual" ||
|
else if (period == "annual" ||
|
||||||
@@ -366,7 +368,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period)
|
|||||||
if (m == 2 && d == 29)
|
if (m == 2 && d == 29)
|
||||||
d = 28;
|
d = 28;
|
||||||
|
|
||||||
return ISO8601d (m, d, y);
|
return ISO8601d (m, d, y, ho, mi, se);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the period to current, and we're done.
|
// Add the period to current, and we're done.
|
||||||
|
|||||||
Reference in New Issue
Block a user