Adds jira issue enforcement field [RUN ALL RSPEC] [RUN AS-IF-FOSS]
What does this MR do?
- Adds new column to
project_settings
:prevent_merge_without_jira_issue
. (Boolean type, defaultfalse
) - Adds new default-off feature flag
jira_issue_association_on_merge_request
for all work defined in this issue - Adds frontend element to allow toggling of new database field.
- Hides this field from users not using GitLab Ultimate and with the feature flag disabled.
- Adds
jira_issue_association_required_to_merge?
method toProjectSetting
for later use.
Database Review
Migrate
== 20210128101707 AddPreventMergeWithoutJiraIssueToProjectSettings: migrating =
-- add_column(:project_settings, :prevent_merge_without_jira_issue, :boolean, {:null=>false, :default=>false})
-> 0.0146s
== 20210128101707 AddPreventMergeWithoutJiraIssueToProjectSettings: migrated (0.0211s)
Rollback
== 20210128101707 AddPreventMergeWithoutJiraIssueToProjectSettings: reverting =
-- remove_column(:project_settings, :prevent_merge_without_jira_issue, :boolean, {:null=>false, :default=>false})
-> 0.0036s
== 20210128101707 AddPreventMergeWithoutJiraIssueToProjectSettings: reverted (0.0107s)
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry - Behind default-off feature flag
- [-] Documentation (if required) - Nothing to document yet
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #297644 (closed)
Edited by 🤖 GitLab Bot 🤖