Skip to content
This repository has been archived by the owner on Apr 18, 2020. It is now read-only.

Commit

Permalink
Added version and type filters to the ticket filters interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirix committed Sep 9, 2012
1 parent d6ce140 commit e1a2870
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions system/controllers/tickets_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ public function action_index()
$value = substr($value, 1);
}

// Milestone filter
if ($filter == 'milestone') {
// Milestone and Version filter
if ($filter == 'milestone' or $filter == 'version') {
foreach (explode(',', $value) as $name) {
$milestone = Milestone::find('slug', $name);
$filter_sql[] = $milestone->id;
}
$sql[] = "milestone_id " . ($prefix == '!' ? 'NOT' :'') . " IN (" . implode(', ', $filter_sql) . ")";
$sql[] = "{$filter}_id " . ($prefix == '!' ? 'NOT' :'') . " IN (" . implode(', ', $filter_sql) . ")";
}
// Status filter
elseif ($filter == 'status') {
Expand Down
2 changes: 1 addition & 1 deletion system/views/default/tickets/_filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
) :''; ?>
</td>
<td>
<?php if (in_array($filter, array('milestone', 'status'))) {
<?php if (in_array($filter, array('milestone', 'status', 'version', 'type'))) {
echo Form::select("filters[{$filter}][values][]",
ticket_filter_options_for($filter),
array('value' => $value)
Expand Down

0 comments on commit e1a2870

Please sign in to comment.