mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug
- Sorting bug in which 'urgency' column was not identified as numeric.
This commit is contained in:
parent
57d577a140
commit
08f32cb9e9
2 changed files with 3 additions and 2 deletions
|
@ -550,7 +550,7 @@ int handleCustomReport (const std::string& report, std::string& outs)
|
||||||
int row = 0;
|
int row = 0;
|
||||||
foreach (task, tasks)
|
foreach (task, tasks)
|
||||||
{
|
{
|
||||||
std::string value = format (task->urgency (), 1, 3);
|
std::string value = format (task->urgency (), 4, 3);
|
||||||
context.hooks.trigger ("format-urgency", "urgency", value);
|
context.hooks.trigger ("format-urgency", "urgency", value);
|
||||||
table.addCell (row++, columnCount, value);
|
table.addCell (row++, columnCount, value);
|
||||||
}
|
}
|
||||||
|
@ -580,7 +580,7 @@ int handleCustomReport (const std::string& report, std::string& outs)
|
||||||
char direction = (*sortColumn)[sortColumn->length () - 1];
|
char direction = (*sortColumn)[sortColumn->length () - 1];
|
||||||
|
|
||||||
// TODO This code should really be using Att::type.
|
// TODO This code should really be using Att::type.
|
||||||
if (column == "id")
|
if (column == "id" || column == "urgency")
|
||||||
table.sortOn (columnIndex[column],
|
table.sortOn (columnIndex[column],
|
||||||
(direction == '+' ?
|
(direction == '+' ?
|
||||||
Table::ascendingNumeric :
|
Table::ascendingNumeric :
|
||||||
|
|
|
@ -661,6 +661,7 @@ int handleInfo (std::string& outs)
|
||||||
//table.addCell (row, 0, "Urgency");
|
//table.addCell (row, 0, "Urgency");
|
||||||
//table.addCell (row, 1, task->urgency ());
|
//table.addCell (row, 1, task->urgency ());
|
||||||
|
|
||||||
|
// Create a second table, containing undo log change details.
|
||||||
Table journal;
|
Table journal;
|
||||||
|
|
||||||
// If an alternating row color is specified, notify the table.
|
// If an alternating row color is specified, notify the table.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue