From 703259bb1f54306c37123031ecac92dfa836f917 Mon Sep 17 00:00:00 2001 From: wandji20 Date: Thu, 22 Feb 2024 13:38:24 +0100 Subject: [PATCH] Add team to task list serializer and service [SCI-10266] --- app/serializers/lists/my_module_serializer.rb | 5 +++++ app/services/lists/my_modules_service.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/serializers/lists/my_module_serializer.rb b/app/serializers/lists/my_module_serializer.rb index 5fd369274..d3b5f6812 100644 --- a/app/serializers/lists/my_module_serializer.rb +++ b/app/serializers/lists/my_module_serializer.rb @@ -23,6 +23,7 @@ module Lists due_date_formatted permissions default_public_user_role_id + team ) def attributes(_options = {}) @@ -148,5 +149,9 @@ module Lists count_unseen: count_unseen_comments(object, @user) } end + + def team + object.team.name + end end end diff --git a/app/services/lists/my_modules_service.rb b/app/services/lists/my_modules_service.rb index 28fcf74a0..47e3bc304 100644 --- a/app/services/lists/my_modules_service.rb +++ b/app/services/lists/my_modules_service.rb @@ -9,7 +9,7 @@ module Lists task_comments: { user: :teams }, user_assignments: :user, designated_users: {}, - experiment: :project + experiment: { project: :team } } private