diff --git a/core/tickets/serializers.py b/core/tickets/serializers.py index c76f476..f954130 100644 --- a/core/tickets/serializers.py +++ b/core/tickets/serializers.py @@ -102,6 +102,13 @@ class IssueSerializer(serializers.ModelSerializer): 'timestamp': assignment.timestamp, 'assigned_to': assignment.assigned_to.username, }) + for relation in obj.item_relations.all(): + timeline.append({ + 'type': 'item_relation', + 'id': relation.id, + 'timestamp': relation.timestamp, + 'item': ItemSerializer(relation.item).data, + }) return sorted(timeline, key=lambda x: x['timestamp']) def get_queryset(self):