Merge pull request #8900 from atm-florian/6.0_fixagenda
fix: when agenda is filterd with "todo" event, do not display "not applicable" event
This commit is contained in:
commit
7eaa2011ba
@ -534,8 +534,8 @@ if ($type) $sql.= " AND ca.id = ".$type;
|
||||
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; }
|
||||
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||
// We must filter on assignement table
|
||||
if ($filtert > 0 || $usergroup > 0)
|
||||
{
|
||||
|
||||
@ -238,7 +238,7 @@ if (! empty($actioncode))
|
||||
else
|
||||
{
|
||||
$sql.=" AND c.code IN ('".implode("','", explode(',', $actioncode))."')";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -253,8 +253,8 @@ if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||
if ($status == '100') { $sql.= " AND a.percent = 100"; }
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; }
|
||||
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||
if ($search_title) $sql.=natural_search("a.label", $search_title);
|
||||
// We must filter on assignement table
|
||||
if ($filtert > 0 || $usergroup > 0)
|
||||
|
||||
@ -427,8 +427,8 @@ if ($type) $sql.= " AND ca.id = ".$type;
|
||||
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; }
|
||||
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||
// We must filter on assignement table
|
||||
if ($filtert > 0 || $usergroup > 0)
|
||||
{
|
||||
|
||||
@ -446,8 +446,8 @@ if ($type) $sql.= " AND ca.id = ".$type;
|
||||
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; }
|
||||
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||
// We must filter on assignement table
|
||||
if ($filtert > 0 || $usergroup > 0)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user