- Removed duplicate legacy value map entry.
- Added version number to legacy mapping.
- Added TODO for later clarification.
This commit is contained in:
Paul Beckingham 2015-02-17 08:39:53 -05:00
parent 91f6980d2f
commit 952d743218

View file

@ -160,19 +160,19 @@ std::string legacyCheckForDeprecatedColumns ()
////////////////////////////////////////////////////////////////////////////////
void legacyAttributeMap (std::string& name)
{
// TW-1274
// TW-1274, 2.4.0
if (name == "modification")
name = "modified";
}
////////////////////////////////////////////////////////////////////////////////
// TODO Is this needed, given Task::upgradeLegacyValues?
void legacyValueMap (const std::string& name, std::string& value)
{
// 2014-07-03: One-time initialization value mapping.
static std::map <std::string, std::string> mapping;
if (mapping.size () == 0)
{
mapping["hrs"] = "hours";
mapping["hrs"] = "hours";
mapping["hr"] = "hours";
mapping["mins"] = "minutes";
@ -180,13 +180,13 @@ void legacyValueMap (const std::string& name, std::string& value)
mapping["mths"] = "months";
mapping["mth"] = "months";
mapping["mos"] = "months";
mapping["m"] = "months";
mapping["m"] = "months"; // ?
mapping["qrtrs"] = "quarters";
mapping["qtrs"] = "quarters";
mapping["qtr"] = "quarters";
mapping["secs"] = "seconds";
mapping["sec"] = "seconds";
mapping["s"] = "seconds";
mapping["s"] = "seconds"; // ?
mapping["wks"] = "weeks";
mapping["wk"] = "weeks";
mapping["yrs"] = "years";