Custom Query\n"; /* This logic matches up to equivalent logic in the macro_RunReport * function in inc/report */ $params = array(); if (strlen($_SERVER['QUERY_STRING'])) { $qs = $_SERVER['QUERY_STRING']; } else { $qs = mtrack_get_pathinfo(); } list ($params, $mparams) = MTrack_Report::parseQuery($qs); echo "
"; echo "
"; $params = json_encode($params); $milestones = json_encode(array_values(MTrack_Milestone::enumMilestones(true))); echo << Add Filter: "; echo " "; } $all_cols = array(); // Add in the selected columns in order first foreach ($mparams['col'] as $col) { $field = $C->fieldByName($col); if ($field) { $all_cols[$field->name] = $field->label; } else { $all_cols[$col] = ucfirst($col); } } // Add in other possible fields foreach ($fields as $field) { $all_cols[$field] = ucfirst($field); } $possible_fields = array( 'severity', 'remaining' ); foreach ($possible_fields as $name) { $all_cols[$name] = ucfirst($name); } foreach ($C->fields as $f) { $all_cols[$f->name] = $f->label; } foreach ($all_cols as $name => $label) { add_col($name, $label); } echo <<
HTML; if (strlen(trim($qs))) { echo MTrack_Report::macro_TicketQuery($qs); } mtrack_foot();