Fix matching project name during urgency calculation

This commit is contained in:
Vladyslav Tronko 2021-07-07 21:05:30 +03:00 committed by Tomas Babej
parent 9c2affa0cb
commit af6f2b55ec
2 changed files with 10 additions and 2 deletions

View file

@ -468,8 +468,12 @@ int CmdInfo::execute (std::string& output)
(end = var.first.find (".coefficient")) != std::string::npos)
{
auto project = var.first.substr (21, end - 21);
if (task.get ("project").find (project) == 0)
const std::string taskProjectName = task.get("project");
if (taskProjectName == project ||
taskProjectName.find(project + '.') == 0)
{
urgencyTerm (urgencyDetails, "PROJECT " + project, 1.0, var.second);
}
}
// urgency.user.tag.<tag>.coefficient