@@ -307,6 +308,8 @@
{
$( row ).addClass(data.row_class);
},
+ dom: 'ltBp',
+ buttons: ["colvis"],
"columns": [
{"data": "id",
@@ -343,16 +346,18 @@
priority = "danger";
}
return '
'+data+'
';
- }
+ },
+ "visible": false,
},
{"data": "queue",
"render": function(data, type, row, meta) {
return data.title;
- }
+ },
+ "visible": false,
},
{"data": "status"},
{"data": "created"},
- {"data": "due_date"},
+ {"data": "due_date", "visible": false},
{"data": "assigned_to",
"render": function(data, type, row, meta) {
if (data != "None") {
@@ -364,7 +369,8 @@
}
},
{"data": "submitter"},
- {"data": "time_spent"},
+ {"data": "time_spent", "visible": false},
+ {"data": "kbitem"},
]
});
})
diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py
index 1cd7e293..78869041 100644
--- a/helpdesk/views/staff.py
+++ b/helpdesk/views/staff.py
@@ -819,6 +819,7 @@ def ticket_list(request):
# a query, to be saved if needed:
query_params = {
'filtering': {},
+ 'filtering_or': {},
'sorting': None,
'sortreverse': False,
'search_string': '',
@@ -884,12 +885,19 @@ def ticket_list(request):
('status', 'status__in'),
('kbitem', 'kbitem__in'),
]
-
+ filter_null_params = dict([
+ ('queue', 'queue__id__isnull'),
+ ('assigned_to', 'assigned_to__id__isnull'),
+ ('status', 'status__isnull'),
+ ('kbitem', 'kbitem__isnull'),
+ ])
for param, filter_command in filter_in_params:
- patterns = request.GET.getlist(param)
- if patterns:
+ if not request.GET.get(param) is None:
+ patterns = request.GET.getlist(param)
try:
pattern_pks = [int(pattern) for pattern in patterns]
+ if -1 in pattern_pks:
+ query_params['filtering_or'][filter_null_params[param]] = True
query_params['filtering'][filter_command] = pattern_pks
except ValueError:
pass