forked from extern/django-helpdesk
Add submitter email to ticket list
This commit is contained in:
parent
ebd876d0e2
commit
5da7069dbd
@ -15,6 +15,7 @@ datatables for ticket_list.html. Called from staff.datatables_ticket_list.
|
||||
class DatatablesTicketSerializer(serializers.ModelSerializer):
|
||||
ticket = serializers.SerializerMethodField()
|
||||
assigned_to = serializers.SerializerMethodField()
|
||||
submitter = serializers.SerializerMethodField()
|
||||
created = serializers.SerializerMethodField()
|
||||
due_date = serializers.SerializerMethodField()
|
||||
status = serializers.SerializerMethodField()
|
||||
@ -26,7 +27,7 @@ class DatatablesTicketSerializer(serializers.ModelSerializer):
|
||||
model = Ticket
|
||||
# fields = '__all__'
|
||||
fields = ('ticket', 'id', 'priority', 'title', 'queue', 'status',
|
||||
'created', 'due_date', 'assigned_to', 'row_class',
|
||||
'created', 'due_date', 'assigned_to', 'submitter', 'row_class',
|
||||
'time_spent')
|
||||
|
||||
def get_queue(self, obj):
|
||||
@ -53,6 +54,9 @@ class DatatablesTicketSerializer(serializers.ModelSerializer):
|
||||
else:
|
||||
return ("None")
|
||||
|
||||
def get_submitter(self, obj):
|
||||
return obj.submitter_email
|
||||
|
||||
def get_time_spent(self, obj):
|
||||
return format_time_spent(obj.time_spent)
|
||||
|
||||
|
@ -66,6 +66,7 @@
|
||||
<th>{% trans "Created" %}</th>
|
||||
<th>{% trans "Due Date" %}</th>
|
||||
<th>{% trans "Owner" %}</th>
|
||||
<th>{% trans "Submitter" %}</th>
|
||||
<th>{% trans "Time Spent" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -358,6 +359,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{"data": "submitter"},
|
||||
{"data": "time_spent"},
|
||||
]
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user