diff --git a/apps/tickets/serializers/ticket.py b/apps/tickets/serializers/ticket.py index b7bcde25a..f148c6375 100644 --- a/apps/tickets/serializers/ticket.py +++ b/apps/tickets/serializers/ticket.py @@ -14,7 +14,7 @@ class TicketSerializer(serializers.ModelSerializer): 'id', 'user', 'user_display', 'title', 'body', 'assignees', 'assignees_display', 'status', 'action', 'date_created', 'date_updated', - 'type_display', 'action_display', + 'type', 'type_display', 'action_display', ] read_only_fields = [ 'user_display', 'assignees_display', diff --git a/apps/tickets/templates/tickets/ticket_list.html b/apps/tickets/templates/tickets/ticket_list.html index c51d48072..dfbc973e7 100644 --- a/apps/tickets/templates/tickets/ticket_list.html +++ b/apps/tickets/templates/tickets/ticket_list.html @@ -67,24 +67,27 @@ function initTable() { var detailBtn = '' + cellData + ''; $(td).html(detailBtn.replace("{{ DEFAULT_PK }}", rowData.id)); }}, + {targets: 3, createdCell: function (td, cellData, rowData) { + $(td).html(rowData.type_display) + }}, {targets: 4, createdCell: function (td, cellData) { if (cellData === "open") { $(td).html(''); } else { $(td).html('') } - }}, - {targets: 4, createdCell: function (td, cellData) { + }}, + {targets: 5, createdCell: function (td, cellData) { var d = toSafeLocalDateStr(cellData); $(td).html(d) - }}, + }} ], ajax_url: listUrl, columns: [ {data: "id"}, {data: "title"}, - {data: "user_display"}, {data: "type_display"}, + {data: "user_display"}, {data: "type"}, {data: "status", width: "40px"}, - {data: "date_created"}, + {data: "date_created"} ], op_html: $('#actions').html() };