diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-05-18 20:05:47 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-05-18 20:41:31 -0300 |
commit | a355bcac4ba2fda77032f1cb7d88579f77a0ebe6 (patch) | |
tree | ae81c7d12642fb8a4b224d56fad40736c1764d45 | |
parent | 7efa0aa02c1590b943028ef12056717b0b078e28 (diff) | |
download | gitlab-ce-a355bcac4ba2fda77032f1cb7d88579f77a0ebe6.tar.gz |
Stop loading MergeRequestEntity data on sidebar request
5 files changed, 4 insertions, 4 deletions
diff --git a/app/serializers/merge_request_basic_entity.rb b/app/serializers/merge_request_basic_entity.rb index 8771345c135..8461f158bb5 100644 --- a/app/serializers/merge_request_basic_entity.rb +++ b/app/serializers/merge_request_basic_entity.rb @@ -1,4 +1,5 @@ class MergeRequestBasicEntity < Grape::Entity + expose :assignee_id expose :merge_status expose :merge_error expose :state diff --git a/app/serializers/merge_request_entity.rb b/app/serializers/merge_request_entity.rb index a49f4d834cd..eb9d3861ee7 100644 --- a/app/serializers/merge_request_entity.rb +++ b/app/serializers/merge_request_entity.rb @@ -1,7 +1,6 @@ class MergeRequestEntity < IssuableEntity include RequestAwareEntity - expose :assignee_id expose :in_progress_merge_commit_sha expose :locked_at expose :merge_commit_sha diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index ac84fffe831..e49bd5ebb13 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -140,7 +140,7 @@ :javascript gl.sidebarOptions = { - endpoint: "#{issuable_json_path(issuable)}", + endpoint: "#{issuable_json_path(issuable)}?basic=true", editable: #{can_edit_issuable ? true : false}, currentUser: #{current_user.to_json(only: [:username, :id, :name], methods: :avatar_url)}, rootPath: "#{root_path}" diff --git a/spec/fixtures/api/schemas/entities/merge_request.json b/spec/fixtures/api/schemas/entities/merge_request.json index e5df3e7b6d1..4afbb87453e 100644 --- a/spec/fixtures/api/schemas/entities/merge_request.json +++ b/spec/fixtures/api/schemas/entities/merge_request.json @@ -3,7 +3,6 @@ "properties" : { "id": { "type": "integer" }, "iid": { "type": "integer" }, - "assignee_id": { "type": ["integer", "null"] }, "author_id": { "type": "integer" }, "description": { "type": ["string", "null"] }, "lock_version": { "type": ["string", "null"] }, diff --git a/spec/fixtures/api/schemas/entities/merge_request_basic.json b/spec/fixtures/api/schemas/entities/merge_request_basic.json index ea6364b878c..6b14188582a 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_basic.json +++ b/spec/fixtures/api/schemas/entities/merge_request_basic.json @@ -8,7 +8,8 @@ "total_time_spent": { "type": "integer" }, "human_time_estimate": { "type": ["string", "null"] }, "human_total_time_spent": { "type": ["string", "null"] }, - "merge_error": { "type": ["string", "null"] } + "merge_error": { "type": ["string", "null"] }, + "assignee_id": { "type": ["integer", "null"] } }, "additionalProperties": false } |