Commit 31be53fc authored by Eugenia Grieff's avatar Eugenia Grieff

Enable cached_sidebar_open_issues_count by default

- Update docs
- Update specs
parent 48e6b011
......@@ -63,7 +63,7 @@ module GroupsHelper
end
def group_open_issues_count(group)
if Feature.enabled?(:cached_sidebar_open_issues_count, group)
if Feature.enabled?(:cached_sidebar_open_issues_count, group, default_enabled: :yaml)
cached_open_group_issues_count(group)
else
number_with_delimiter(group_issues_count(state: 'opened'))
......
---
title: Cache open issues count in group sidebar
merge_request: 49739
author:
type: added
......@@ -5,4 +5,4 @@ rollout_issue_url:
milestone: '13.8'
type: development
group: group::product planning
default_enabled: false
default_enabled: true
......@@ -197,18 +197,18 @@ You can then see issue statuses in the [issue list](#issues-list) and the
## Enable or disable cached issue count **(FREE SELF)**
Cached issue count in the left sidebar is under development and not ready for production use. It is
deployed behind a feature flag that is **disabled by default**.
deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md)
can enable it.
can disable it.
To enable it:
To disable it:
```ruby
Feature.enable(:cached_sidebar_open_issues_count)
Feature.disable(:cached_sidebar_open_issues_count)
```
To disable it:
To enable it:
```ruby
Feature.disable(:cached_sidebar_open_issues_count)
Feature.enable(:cached_sidebar_open_issues_count)
```
......@@ -454,18 +454,12 @@ RSpec.describe GroupsHelper do
allow(helper).to receive(:current_user) { current_user }
end
context 'when cached_sidebar_open_issues_count feature flag is enabled' do
before do
stub_feature_flags(cached_sidebar_open_issues_count: true)
it 'returns count value from cache' do
allow_next_instance_of(count_service) do |service|
allow(service).to receive(:count).and_return(2500)
end
it 'returns count value from cache' do
allow_next_instance_of(count_service) do |service|
allow(service).to receive(:count).and_return(2500)
end
expect(helper.group_open_issues_count(group)).to eq('2.5k')
end
expect(helper.group_open_issues_count(group)).to eq('2.5k')
end
context 'when cached_sidebar_open_issues_count feature flag is disabled' do
......
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