Deprecation

- Removed version 1.x column name mapping support.
This commit is contained in:
Paul Beckingham 2014-01-26 13:51:00 -05:00
parent 885946a24e
commit 4f86602ded
2 changed files with 16 additions and 25 deletions

4
NEWS
View file

@ -16,6 +16,10 @@ Newly deprecated features in taskwarrior 2.4.0
- The alias '_query' is deprecated. - The alias '_query' is deprecated.
Removed features in 2.4.0
- Version 1.x column names no longer supported.
Known Issues Known Issues
- -

View file

@ -42,31 +42,18 @@ void legacyAttributeCheck (const std::string& name)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void legacyColumnMap (std::string& name) void legacyColumnMap (std::string& name)
{ {
// One-time initialization, on demand. // 2014-01-26: priority_long --> priority.long Mapping removed
static std::map <std::string, std::string> legacyMap; // 2014-01-26: entry_time --> entry Mapping removed
if (! legacyMap.size ()) // 2014-01-26: start_time --> start Mapping removed
{ // 2014-01-26: end_time --> end Mapping removed
legacyMap["priority_long"] = "priority.long"; // Deprecated. // 2014-01-26: countdown --> due.countdown Mapping removed
legacyMap["entry_time"] = "entry"; // Deprecated. // 2014-01-26: countdown_compact --> due.countdown Mapping removed
legacyMap["start_time"] = "start"; // Deprecated. // 2014-01-26: age --> entry.age Mapping removed
legacyMap["end_time"] = "end"; // Deprecated. // 2014-01-26: age_compact --> entry.age Mapping removed
legacyMap["countdown"] = "due.countdown"; // Deprecated. // 2014-01-26: active --> start.active Mapping removed
legacyMap["countdown_compact"] = "due.countdown"; // Deprecated. // 2014-01-26: recurrence_indicator --> recur.indicator Mapping removed
legacyMap["age"] = "entry.age"; // Deprecated. // 2014-01-26: tag_indicator --> tags.indicator Mapping removed
legacyMap["age_compact"] = "entry.age"; // Deprecated. // 2014-01-26: description_only --> description.desc Mapping removed
legacyMap["active"] = "start.active"; // Deprecated.
legacyMap["recurrence_indicator"] = "recur.indicator"; // Deprecated.
legacyMap["tag_indicator"] = "tags.indicator"; // Deprecated.
legacyMap["description_only"] = "description.desc"; // Deprecated.
}
// 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_CMD_CUSTOM_OLD_FIELD, name, found->second));
name = found->second;
}
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////