Commit a43f09ec authored by Jiaan Louw's avatar Jiaan Louw

Remove jira_issue_association_on_merge_request feature flag

Changelog: other
EE: true
parent 9a0f518f
......@@ -47,12 +47,9 @@ You can [disable comments](#disable-comments-on-jira-issues) on issues.
### Require associated Jira issue for merge requests to be merged **(ULTIMATE)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/280766) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.12 behind a feature flag, disabled by default.
> - [Deployed behind a feature flag](../../user/feature_flags.md), disabled by default.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/280766) in GitLab 13.12, disabled behind `jira_issue_association_on_merge_request` [feature flag](../../administration/feature_flags.md).
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61722) in GitLab 14.1.
> - Enabled on GitLab.com.
> - Recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-the-ability-to-require-an-associated-jira-issue-on-merge-requests). **(ULTIMATE SELF)**
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/335280) in GitLab 14.2.
You can prevent merge requests from being merged if they do not refer to a Jira issue.
To enforce this:
......@@ -181,22 +178,3 @@ adding a comment to the Jira issue:
1. Refer to the [Configure GitLab](configure.md) instructions.
1. Clear the **Enable comments** checkbox.
## Enable or disable the ability to require an associated Jira issue on merge requests
The ability to require an associated Jira issue on merge requests is under development
but ready for production use. It is deployed behind a feature flag that is
**enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md) can opt to disable it.
To enable it:
```ruby
Feature.enable(:jira_issue_association_on_merge_request)
```
To disable it:
```ruby
Feature.disable(:jira_issue_association_on_merge_request)
```
......@@ -231,7 +231,6 @@ module EE
strong_memoize(:jira_issue_association_required_to_merge_enabled) do
next false unless jira_issues_integration_available?
next false unless jira_integration&.active?
next false unless ::Feature.enabled?(:jira_issue_association_on_merge_request, self, default_enabled: :yaml)
next false unless feature_available?(:jira_issue_association_enforcement)
true
......
---
name: jira_issue_association_on_merge_request
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52896
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/300271
milestone: '13.9'
type: development
group: group::compliance
default_enabled: true
......@@ -138,20 +138,18 @@ RSpec.describe Project do
)
project.build_jira_integration(active: jira_integration_active)
stub_feature_flags(jira_issue_association_on_merge_request: feature_flag)
end
where(
jira_integration_licensed: [true, false],
jira_integration_active: [true, false],
jira_enforcement_licensed: [true, false],
feature_flag: [true, false]
jira_enforcement_licensed: [true, false]
)
with_them do
it 'is enabled if all values are true' do
expect(project.jira_issue_association_required_to_merge_enabled?).to be(
jira_integration_licensed && jira_integration_active && jira_enforcement_licensed && feature_flag
jira_integration_licensed && jira_integration_active && jira_enforcement_licensed
)
end
end
......
......@@ -29,7 +29,6 @@ RSpec.describe MergeRequestPollCachedWidgetEntity do
before do
stub_licensed_features(jira_issues_integration: true, jira_issue_association_enforcement: true)
stub_feature_flags(jira_issue_association_on_merge_request: true)
end
it { is_expected.to include(:jira_associations) }
......@@ -90,16 +89,11 @@ RSpec.describe MergeRequestPollCachedWidgetEntity do
context 'when feature is NOT available' do
using RSpec::Parameterized::TableSyntax
where(:licensed, :feature_flag) do
false | true
true | false
false | false
end
where(licensed: [true, false])
with_them do
before do
stub_licensed_features(jira_issue_association_enforcement: licensed)
stub_feature_flags(jira_issue_association_on_merge_request: feature_flag)
end
it { is_expected.not_to include(:jira_associations) }
......
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