Commit 35c4d909 authored by Thong Kuah's avatar Thong Kuah

Merge branch '57073-remove-ff-optimize_issue_filter_assigned_to_self' into 'master'

Remove feature flag optimize_issue_filter_assigned_to_self [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!57775
parents 0fa17e35 9c85dd1c
...@@ -48,13 +48,11 @@ class IssuesFinder < IssuableFinder ...@@ -48,13 +48,11 @@ class IssuesFinder < IssuableFinder
def with_confidentiality_access_check def with_confidentiality_access_check
return Issue.all if params.user_can_see_all_confidential_issues? return Issue.all if params.user_can_see_all_confidential_issues?
if Feature.enabled?(:optimize_issue_filter_assigned_to_self, default_enabled: :yaml) # If already filtering by assignee we can skip confidentiality since a user
# If already filtering by assignee we can skip confidentiality since a user # can always see confidential issues assigned to them. This is just an
# can always see confidential issues assigned to them. This is just an # optimization since a very common usecase of this Finder is to load the
# optimization since a very common usecase of this Finder is to load the # count of issues assigned to the user for the header bar.
# count of issues assigned to the user for the header bar. return Issue.all if current_user && params.assignees.include?(current_user)
return Issue.all if current_user && params.assignees.include?(current_user)
end
return Issue.where('issues.confidential IS NOT TRUE') if params.user_cannot_see_confidential_issues? return Issue.where('issues.confidential IS NOT TRUE') if params.user_cannot_see_confidential_issues?
......
---
title: Remove feature flag optimize_issue_filter_assigned_to_self
merge_request: 57775
author:
type: performance
---
name: optimize_issue_filter_assigned_to_self
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57073
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/325470
milestone: '13.11'
type: development
group: group::global search
default_enabled: false
# frozen_string_literal: true # frozen_string_literal: true
RSpec.shared_examples 'assignee ID filter' do RSpec.shared_examples 'assignee ID filter' do
context 'when optimize_issue_filter_assigned_to_self is disabled' do
before do
stub_feature_flags(optimize_issue_filter_assigned_to_self: false)
end
it 'returns issuables assigned to that user' do
expect(issuables).to contain_exactly(*expected_issuables)
end
end
it 'returns issuables assigned to that user' do it 'returns issuables assigned to that user' do
expect(issuables).to contain_exactly(*expected_issuables) expect(issuables).to contain_exactly(*expected_issuables)
end end
...@@ -23,16 +13,6 @@ RSpec.shared_examples 'assignee NOT ID filter' do ...@@ -23,16 +13,6 @@ RSpec.shared_examples 'assignee NOT ID filter' do
end end
RSpec.shared_examples 'assignee username filter' do RSpec.shared_examples 'assignee username filter' do
context 'when optimize_issue_filter_assigned_to_self is disabled' do
before do
stub_feature_flags(optimize_issue_filter_assigned_to_self: false)
end
it 'returns issuables assigned to those users' do
expect(issuables).to contain_exactly(*expected_issuables)
end
end
it 'returns issuables assigned to those users' do it 'returns issuables assigned to those users' do
expect(issuables).to contain_exactly(*expected_issuables) expect(issuables).to contain_exactly(*expected_issuables)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment