Skip to content

Adds jira issue enforcement field [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Max Woolf requested to merge 297644-jira-association-requirements-be into master

What does this MR do?

  • Adds new column to project_settings: prevent_merge_without_jira_issue. (Boolean type, default false)
  • 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 to ProjectSetting 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)

Screenshot_2021-01-29_at_12.28.54

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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 🤖

Merge request reports