diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/serializers/issue_entity.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/serializers/issue_entity.rb')
-rw-r--r-- | app/serializers/issue_entity.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/serializers/issue_entity.rb b/app/serializers/issue_entity.rb index 3d94d2e2e9d..397f333008c 100644 --- a/app/serializers/issue_entity.rb +++ b/app/serializers/issue_entity.rb @@ -7,11 +7,15 @@ class IssueEntity < IssuableEntity item.try(:upcase) end + format_with(:iso8601) do |item| + item.try(:iso8601) + end + expose :state expose :milestone_id expose :updated_by_id - expose :created_at - expose :updated_at + expose :created_at, format_with: :iso8601 + expose :updated_at, format_with: :iso8601 expose :milestone, using: API::Entities::Milestone expose :labels, using: LabelEntity expose :lock_version @@ -85,6 +89,11 @@ class IssueEntity < IssuableEntity end expose :issue_email_participants do |issue| + # TODO - This is a Temporary solution to avoid leaking participants' emails + # on public/internal projects when issue is not confidential. + # Should be removed when https://gitlab.com/gitlab-org/gitlab/-/issues/383448 is implemented. + next [] unless issue.confidential? + issue.issue_email_participants.map { |x| { email: x.email } } end |