mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-13 18:31:10 +01:00
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):
|
class DatatablesTicketSerializer(serializers.ModelSerializer):
|
||||||
ticket = serializers.SerializerMethodField()
|
ticket = serializers.SerializerMethodField()
|
||||||
assigned_to = serializers.SerializerMethodField()
|
assigned_to = serializers.SerializerMethodField()
|
||||||
|
submitter = serializers.SerializerMethodField()
|
||||||
created = serializers.SerializerMethodField()
|
created = serializers.SerializerMethodField()
|
||||||
due_date = serializers.SerializerMethodField()
|
due_date = serializers.SerializerMethodField()
|
||||||
status = serializers.SerializerMethodField()
|
status = serializers.SerializerMethodField()
|
||||||
@ -26,7 +27,7 @@ class DatatablesTicketSerializer(serializers.ModelSerializer):
|
|||||||
model = Ticket
|
model = Ticket
|
||||||
# fields = '__all__'
|
# fields = '__all__'
|
||||||
fields = ('ticket', 'id', 'priority', 'title', 'queue', 'status',
|
fields = ('ticket', 'id', 'priority', 'title', 'queue', 'status',
|
||||||
'created', 'due_date', 'assigned_to', 'row_class',
|
'created', 'due_date', 'assigned_to', 'submitter', 'row_class',
|
||||||
'time_spent')
|
'time_spent')
|
||||||
|
|
||||||
def get_queue(self, obj):
|
def get_queue(self, obj):
|
||||||
@ -53,6 +54,9 @@ class DatatablesTicketSerializer(serializers.ModelSerializer):
|
|||||||
else:
|
else:
|
||||||
return ("None")
|
return ("None")
|
||||||
|
|
||||||
|
def get_submitter(self, obj):
|
||||||
|
return obj.submitter_email
|
||||||
|
|
||||||
def get_time_spent(self, obj):
|
def get_time_spent(self, obj):
|
||||||
return format_time_spent(obj.time_spent)
|
return format_time_spent(obj.time_spent)
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
<th>{% trans "Created" %}</th>
|
<th>{% trans "Created" %}</th>
|
||||||
<th>{% trans "Due Date" %}</th>
|
<th>{% trans "Due Date" %}</th>
|
||||||
<th>{% trans "Owner" %}</th>
|
<th>{% trans "Owner" %}</th>
|
||||||
|
<th>{% trans "Submitter" %}</th>
|
||||||
<th>{% trans "Time Spent" %}</th>
|
<th>{% trans "Time Spent" %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -358,6 +359,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{"data": "submitter"},
|
||||||
{"data": "time_spent"},
|
{"data": "time_spent"},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user