Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/timelog_type.rb')
-rw-r--r--app/graphql/types/timelog_type.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/graphql/types/timelog_type.rb b/app/graphql/types/timelog_type.rb
index 465e3c492bc..99a619f1b1d 100644
--- a/app/graphql/types/timelog_type.rb
+++ b/app/graphql/types/timelog_type.rb
@@ -26,6 +26,11 @@ module Types
null: true,
description: 'The issue that logged time was added to.'
+ field :merge_request,
+ Types::MergeRequestType,
+ null: true,
+ description: 'The merge request that logged time was added to.'
+
field :note,
Types::Notes::NoteType,
null: true,
@@ -38,5 +43,9 @@ module Types
def issue
Gitlab::Graphql::Loaders::BatchModelLoader.new(Issue, object.issue_id).find
end
+
+ def spent_at
+ object.spent_at || object.created_at
+ end
end
end