diff --git a/src/Context.cpp b/src/Context.cpp index 6232f4a73..fb4a4c144 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -641,7 +641,10 @@ void Context::staticInitialization () } for (auto& col : columns) + { Task::attributes[col.first] = col.second->type (); + Lexer::attributes[col.first] = col.second->type (); + } Task::urgencyProjectCoefficient = config.getReal ("urgency.project.coefficient"); Task::urgencyActiveCoefficient = config.getReal ("urgency.active.coefficient"); diff --git a/src/Lexer.cpp b/src/Lexer.cpp index a4a14cb74..1463e2909 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -34,6 +34,7 @@ static const std::string uuid_pattern = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; static const unsigned int uuid_min_length = 8; +std::map Lexer::attributes; std::string Lexer::dateFormat = ""; bool Lexer::isoEnabled = true; diff --git a/src/Lexer.h b/src/Lexer.h index 476776755..75c2fe59b 100644 --- a/src/Lexer.h +++ b/src/Lexer.h @@ -41,6 +41,7 @@ public: // These are overridable. static std::string dateFormat; static bool isoEnabled; + static std::map attributes; enum class Type { uuid, number, hex, string,