mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
Priority: Converted 'priority' attribute to a UDA
- 'priority.long' and 'priority.short' formats now map to 'priority', and generate a warning. - Man page updated. - Converted priority urgency coefficients to UDA equivalents. - Converted priority color rules to UDA color rules. - Removed 'default.priority' support. - Removed special sort handling for 'priority' field in Variant, added special UDA sort handling. - Removed ColPriority.{h,cpp} source files. - Removed asorted newly-unused variables. - The 'show' command now highlights unused priority settings. - Removed unused localized priority-relateѕ strings. - Added legacy mapping for columns and sort columns for 'priority.long' and 'priority.short' columns in report definitions. - Removed priority color rules implementation. - Removed obsolete tests for #860, #990, custom.priority_long.t. - Updated various tests that set priority default, colors.
This commit is contained in:
parent
7a9d314016
commit
5af4579741
33 changed files with 102 additions and 630 deletions
|
@ -54,6 +54,21 @@ void legacyColumnMap (std::string& name)
|
|||
// 2014-01-26: recurrence_indicator --> recur.indicator Mapping removed
|
||||
// 2014-01-26: tag_indicator --> tags.indicator Mapping removed
|
||||
// 2014-01-26: description_only --> description.desc Mapping removed
|
||||
|
||||
// One-time initialization, on demand.
|
||||
static std::map <std::string, std::string> legacyMap;
|
||||
if (! legacyMap.size ())
|
||||
{
|
||||
legacyMap["priority."] = "priority";
|
||||
}
|
||||
|
||||
// If a legacy column was used, complain about it, but modify it anyway.
|
||||
std::map <std::string, std::string>::iterator found = legacyMap.find (name);
|
||||
if (found != legacyMap.end ())
|
||||
{
|
||||
context.footnote (format (STRING_LEGACY_PRIORITY, name, found->second));
|
||||
name = found->second;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -71,6 +86,21 @@ void legacySortColumnMap (std::string& name)
|
|||
// 2014-01-26: recurrence_indicator --> recur Mapping removed
|
||||
// 2014-01-26: tag_indicator --> tags Mapping removed
|
||||
// 2014-01-26: description_only --> description Mapping removed
|
||||
|
||||
// One-time initialization, on demand.
|
||||
static std::map <std::string, std::string> legacyMap;
|
||||
if (! legacyMap.size ())
|
||||
{
|
||||
legacyMap["priority."] = "priority";
|
||||
}
|
||||
|
||||
// If a legacy column was used, complain about it, but modify it anyway.
|
||||
std::map <std::string, std::string>::iterator found = legacyMap.find (name);
|
||||
if (found != legacyMap.end ())
|
||||
{
|
||||
context.footnote (format (STRING_LEGACY_PRIORITY, name, found->second));
|
||||
name = found->second;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue