diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-11 06:11:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-11 06:11:32 +0300 |
commit | af9703eb5632f26f559429fe046222dc86297b76 (patch) | |
tree | 0009ea830583f75e4eb5aada41c7686798e4c6d5 | |
parent | 0700019b661771fa0881659980541333a7b50e30 (diff) |
Add latest changes from gitlab-org/gitlab@master
20 files changed, 169 insertions, 57 deletions
diff --git a/app/models/work_item.rb b/app/models/work_item.rb index 4e9491b3722..2a2cb3c79b6 100644 --- a/app/models/work_item.rb +++ b/app/models/work_item.rb @@ -4,7 +4,7 @@ class WorkItem < Issue include Gitlab::Utils::StrongMemoize COMMON_QUICK_ACTIONS_COMMANDS = [ - :title, :reopen, :close, :cc, :tableflip, :shrug, :type, :promote_to + :title, :reopen, :close, :cc, :tableflip, :shrug, :type, :promote_to, :checkin_reminder ].freeze self.table_name = 'issues' diff --git a/app/services/admin/abuse_reports/moderate_user_service.rb b/app/services/admin/abuse_reports/moderate_user_service.rb index da61a4dc8f6..823568d9db8 100644 --- a/app/services/admin/abuse_reports/moderate_user_service.rb +++ b/app/services/admin/abuse_reports/moderate_user_service.rb @@ -61,10 +61,17 @@ module Admin def close_report return error('Report already closed') if abuse_report.closed? + close_similar_open_reports abuse_report.closed! success end + def close_similar_open_reports + # admins see the abuse report and other open reports for the same user in one page + # hence, if the request is to close the report, close other open reports for the same user too + abuse_report.similar_open_reports_for_user.update_all(status: 'closed') + end + def close_report_and_record_event event = action diff --git a/config/feature_flags/development/okr_checkin_reminders.yml b/config/feature_flags/development/okr_checkin_reminders.yml new file mode 100644 index 00000000000..c1941700919 --- /dev/null +++ b/config/feature_flags/development/okr_checkin_reminders.yml @@ -0,0 +1,8 @@ +--- +name: okr_checkin_reminders +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130371 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/424235 +milestone: '16.4' +type: development +group: group::incubation +default_enabled: false diff --git a/config/metrics/counts_7d/20230822210848_i_quickactions_checkin_reminder_weekly.yml b/config/metrics/counts_7d/20230822210848_i_quickactions_checkin_reminder_weekly.yml new file mode 100644 index 00000000000..4c98cda8616 --- /dev/null +++ b/config/metrics/counts_7d/20230822210848_i_quickactions_checkin_reminder_weekly.yml @@ -0,0 +1,23 @@ +--- +key_path: redis_hll_counters.quickactions.i_quickactions_checkin_reminder_weekly +name: quickactions_checkin_reminder_weekly +description: Count of WAU using the `/checkin_reminder` quick action +product_section: dev +product_stage: plan +product_group: team_planning +value_type: number +status: active +milestone: "16.4" +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130371 +time_frame: 7d +data_source: redis_hll +data_category: optional +instrumentation_class: RedisHLLMetric +options: + events: + - i_quickactions_checkin_reminder +performance_indicator_type: [] +distribution: +- ee +tier: +- ultimate diff --git a/data/deprecations/16-4-deprecate-change-vulnerability-status-with-developer-role.yml b/data/deprecations/16-4-deprecate-change-vulnerability-status-with-developer-role.yml new file mode 100644 index 00000000000..e35c755ba87 --- /dev/null +++ b/data/deprecations/16-4-deprecate-change-vulnerability-status-with-developer-role.yml @@ -0,0 +1,11 @@ +- title: "Deprecate change vulnerability status from the Developer role" + removal_milestone: "17.0" + announcement_milestone: "16.4" + breaking_change: true + reporter: abellucci + stage: govern + issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/424133 + body: | + The ability for Developers to change the status of vulnerabilities is now deprecated. We plan to make a breaking change in the upcoming GitLab 17.0 release to remove this ability from the Developer role. Users who wish to continue to grant this permission to developers can [create a custom role](https://docs.gitlab.com/ee/user/permissions.html#custom-roles) for their developers and add in the `admin_vulnerability` permission to give them this access. + tiers: [Gold, Ultimate] + documentation_url: https://docs.gitlab.com/ee/user/permissions.html#custom-roles diff --git a/db/migrate/20230822175304_add_okr_reminder_fields_to_work_item_progresses.rb b/db/migrate/20230822175304_add_okr_reminder_fields_to_work_item_progresses.rb new file mode 100644 index 00000000000..7ca2e690521 --- /dev/null +++ b/db/migrate/20230822175304_add_okr_reminder_fields_to_work_item_progresses.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddOkrReminderFieldsToWorkItemProgresses < Gitlab::Database::Migration[2.1] + def change + add_column :work_item_progresses, :reminder_frequency, :integer, limit: 2, null: false, default: 0 + end +end diff --git a/db/schema_migrations/20230822175304 b/db/schema_migrations/20230822175304 new file mode 100644 index 00000000000..f858b7074f3 --- /dev/null +++ b/db/schema_migrations/20230822175304 @@ -0,0 +1 @@ +4feff19bb2ff05dbf4bc673ced92d1d7b7c5d337cd8895ab490634ea42a6a349
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 09b4ba9f825..75fb3c6ef28 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -25149,7 +25149,8 @@ CREATE TABLE work_item_progresses ( start_value double precision DEFAULT 0.0 NOT NULL, end_value double precision DEFAULT 100.0 NOT NULL, current_value double precision DEFAULT 0.0 NOT NULL, - rollup_progress boolean DEFAULT true NOT NULL + rollup_progress boolean DEFAULT true NOT NULL, + reminder_frequency smallint DEFAULT 0 NOT NULL ); CREATE TABLE work_item_types ( diff --git a/doc/raketasks/import.md b/doc/raketasks/import.md index d3b734eba12..d6e9a71abec 100644 --- a/doc/raketasks/import.md +++ b/doc/raketasks/import.md @@ -3,6 +3,7 @@ stage: Systems group: Distribution info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments remove_date: '2023-08-22' +redirect_to: '../index.md' --- # Import bare repositories (removed) **(FREE SELF)** diff --git a/doc/update/deprecations.md b/doc/update/deprecations.md index 31c186c9a7a..3e31c1ab46c 100644 --- a/doc/update/deprecations.md +++ b/doc/update/deprecations.md @@ -291,6 +291,20 @@ The GitLab Runner Kubernetes executor setting, `terminationGracePeriodSeconds`, <div class="deprecation breaking-change" data-milestone="17.0"> +### Deprecate change vulnerability status from the Developer role + +<div class="deprecation-notes"> +- Announced in GitLab <span class="milestone">16.4</span> +- Removal in GitLab <span class="milestone">17.0</span> ([breaking change](https://docs.gitlab.com/ee/update/terminology.html#breaking-change)) +- To discuss this change or learn more, see the [deprecation issue](https://gitlab.com/gitlab-org/gitlab/-/issues/424133). +</div> + +The ability for Developers to change the status of vulnerabilities is now deprecated. We plan to make a breaking change in the upcoming GitLab 17.0 release to remove this ability from the Developer role. Users who wish to continue to grant this permission to developers can [create a custom role](https://docs.gitlab.com/ee/user/permissions.html#custom-roles) for their developers and add in the `admin_vulnerability` permission to give them this access. + +</div> + +<div class="deprecation breaking-change" data-milestone="17.0"> + ### Deprecate field `hasSolutions` from GraphQL VulnerabilityType <div class="deprecation-notes"> diff --git a/doc/user/project/import/github.md b/doc/user/project/import/github.md index 933e3371744..77e5622afcd 100644 --- a/doc/user/project/import/github.md +++ b/doc/user/project/import/github.md @@ -58,9 +58,8 @@ To import projects from GitHub: When issues and pull requests are being imported, the importer attempts to find their GitHub authors and assignees in the database of the GitLab instance. Pull requests are called _merge requests_ in GitLab. For the importer to succeed, matching email addresses are required. -- GitHub accounts must have a GitHub public-facing email address is populated. This means all comments and contributions - are properly mapped to the same user in GitLab. GitHub Enterprise does not require this field to be populated so you - may have to add it on existing accounts. +- GitHub accounts must have a GitHub public-facing email address so that all comments and contributions can be properly mapped to + the same user in GitLab. GitHub Enterprise does not require this field to be populated so you might have to add it on existing accounts. ### Importing from GitHub Enterprise to self-managed GitLab diff --git a/doc/user/project/import/phabricator.md b/doc/user/project/import/phabricator.md index 7b9615b883c..b316d469f0c 100644 --- a/doc/user/project/import/phabricator.md +++ b/doc/user/project/import/phabricator.md @@ -3,6 +3,7 @@ stage: Manage group: Import and Integrate info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments remove_date: '2023-08-22' +redirect_to: '../../../index.md' --- # Import Phabricator tasks into a GitLab project (removed) **(FREE SELF)** diff --git a/doc/user/project/quick_actions.md b/doc/user/project/quick_actions.md index aee052631fc..4b5c4e2232a 100644 --- a/doc/user/project/quick_actions.md +++ b/doc/user/project/quick_actions.md @@ -147,6 +147,7 @@ To auto-format this table, use the VS Code Markdown Table formatter: `https://do | `/assign @user1 @user2` | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | Assign one or more users. | | `/assign me` | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | Assign yourself. | | `/cc @user` | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | Mention a user. In GitLab 15.0 and later, this command performs no action. You can instead type `CC @user` or only `@user`. [In GitLab 14.9 and earlier](https://gitlab.com/gitlab-org/gitlab/-/issues/31200), mentioning a user at the start of a line creates a specific type of to-do item notification. | +| `/checkin_reminder` | **{dotted-circle}** No| **{check-circle}** Yes | **{dotted-circle}** No | Set checkin reminder cadence. Options are `weekly`, `twice-monthly`, `monthly`, `never`. This action is behind a feature flag. | | `/clear_health_status` | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | Clear [health status](issues/managing_issues.md#health-status). | | `/clear_weight` | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No | Clear weight. | | `/close` | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | Close. | diff --git a/locale/gitlab.pot b/locale/gitlab.pot index e9692ecb13c..f9441aa63f3 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -9677,6 +9677,9 @@ msgstr "" msgid "Check your sign-up restrictions" msgstr "" +msgid "Checkin reminder has been enabled." +msgstr "" + msgid "Checking %{text} availability…" msgstr "" @@ -12410,6 +12413,9 @@ msgstr "" msgid "Configure advanced permissions, Large File Storage, two-factor authentication, and customer relations settings." msgstr "" +msgid "Configure checkin reminder frequency" +msgstr "" + msgid "Configure custom rules for Jira issue key matching" msgstr "" @@ -43785,6 +43791,9 @@ msgstr "" msgid "Sets %{epic_ref} as parent epic." msgstr "" +msgid "Sets checkin reminder frequency to %{frequency}." +msgstr "" + msgid "Sets health status to %{health_status}." msgstr "" diff --git a/qa/gdk/Dockerfile.gdk b/qa/gdk/Dockerfile.gdk index 1abd3309461..2705a356938 100644 --- a/qa/gdk/Dockerfile.gdk +++ b/qa/gdk/Dockerfile.gdk @@ -1,23 +1,17 @@ -FROM registry.gitlab.com/gitlab-org/gitlab-development-kit/asdf-bootstrapped-verify:main@sha256:af7e6e7a9d6338ca7045e878b9717a1c8feb507dbd1e69db7ef407af4074f27d +FROM registry.gitlab.com/gitlab-org/gitlab-development-kit/asdf-bootstrapped-verify:main@sha256:af7e6e7a9d6338ca7045e878b9717a1c8feb507dbd1e69db7ef407af4074f27d as base ENV GITLAB_LICENSE_MODE=test \ GDK_KILL_CONFIRM=true -# Allow passwordless /etc/hosts update by gdk user -USER root -RUN echo "gdk ALL=(ALL) NOPASSWD: /usr/bin/tee -a /etc/hosts" >> /etc/sudoers - -USER gdk - # Clone GDK at specific sha and bootstrap packages # -ARG GDK_SHA=747ab64be815f5c239d5d63209527a42bd838e83 -ARG GEM_CACHE=/home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/cache -RUN --mount=type=cache,target=${GEM_CACHE},uid=1000,gid=1000 \ - set -eux; \ +ARG GDK_SHA=b69c76534928632a6fd1d89b86ccc62eaae4c66a +RUN set -eux; \ git clone --depth 1 https://gitlab.com/gitlab-org/gitlab-development-kit.git && cd gitlab-development-kit; \ git fetch --depth 1 origin ${GDK_SHA} && git -c advice.detachedHead=false checkout ${GDK_SHA}; \ - mkdir gitlab && make bootstrap + mkdir gitlab \ + && make bootstrap \ + && sudo apt-get autoclean WORKDIR /home/gdk/gitlab-development-kit @@ -25,59 +19,83 @@ COPY --chown=gdk:gdk qa/gdk/gdk.yml ./ # Build gitlab-shell # +FROM base as gitlab-shell + COPY --chown=gdk:gdk GITLAB_SHELL_VERSION ./gitlab/ -RUN --mount=type=cache,target=${GEM_CACHE},uid=1000,gid=1000 \ - set -eux; \ - make gitlab-shell-setup \ - && cd gitlab-shell && go clean -cache -modcache -r +RUN make gitlab-shell-setup \ + && cd gitlab-shell \ + && go clean -cache -modcache -r \ + && rm -rf /home/gdk/.asdf/installs/ruby/*/lib/ruby/gems/*/cache # Build gitlab-workhorse # +FROM base as workhorse + COPY --chown=gdk:gdk VERSION GITLAB_WORKHORSE_VERSION ./gitlab/ COPY --chown=gdk:gdk workhorse ./gitlab/workhorse -RUN --mount=type=cache,target=${GEM_CACHE},uid=1000,gid=1000 \ - set -eux; \ - make gitlab-workhorse-setup && mv gitlab/workhorse ./ \ - && cd workhorse && go clean -cache -modcache -r +RUN make gitlab-workhorse-setup \ + && cd gitlab/workhorse \ + && go clean -cache -modcache -r # Build gitaly # +FROM base as gitaly COPY --chown=gdk:gdk GITALY_SERVER_VERSION ./gitlab/ -RUN --mount=type=cache,target=${GEM_CACHE},uid=1000,gid=1000 \ - set -eux; \ +RUN set -eux; \ make gitaly-setup; \ cd gitaly \ && go clean -cache -modcache -r \ && rm -rf _build/cache \ - _build/deps/git/source \ - _build/deps/libgit2/source \ _build/deps \ _build/intermediate # Install gitlab gem dependencies # +FROM base as gitlab-gems + COPY --chown=gdk:gdk Gemfile Gemfile.lock ./gitlab/ COPY --chown=gdk:gdk vendor/gems/ ./gitlab/vendor/gems/ COPY --chown=gdk:gdk gems/ ./gitlab/gems/ -RUN --mount=type=cache,target=${GEM_CACHE},uid=1000,gid=1000 \ - make .gitlab-bundle +RUN make .gitlab-bundle \ + && cd gitlab \ + && rm -rf /home/gdk/.asdf/installs/ruby/*/lib/ruby/gems/*/cache # Install gitlab npm dependencies # +FROM base as gitlab-node-modules + COPY --chown=gdk:gdk package.json yarn.lock ./gitlab/ COPY --chown=gdk:gdk scripts/frontend/postinstall.js ./gitlab/scripts/frontend/postinstall.js +COPY --chown=gdk:gdk scripts/frontend/preinstall.mjs ./gitlab/scripts/frontend/preinstall.mjs RUN make .gitlab-yarn && yarn cache clean +# Build final image +# +FROM base as gdk + +# Set global defaults so we can initialize empty git repo +RUN git config --global init.defaultBranch master \ + && git config --global user.email "gdk@example.com" \ + && git config --global user.name "gdk" + +# Copy all components from separate docker stages +COPY --from=gitlab-shell --chown=gdk:gdk /home/gdk/gitlab-development-kit/gitlab-shell ./gitlab-shell/ +COPY --from=gitaly --chown=gdk:gdk /home/gdk/gitlab-development-kit/gitaly ./gitaly/ +COPY --from=workhorse --chown=gdk:gdk /home/gdk/gitlab-development-kit/gitlab/workhorse ./gitlab/workhorse/ +COPY --from=gitlab-gems --chown=gdk:gdk /home/gdk/.asdf/installs/ruby /home/gdk/.asdf/installs/ruby/ +COPY --from=gitlab-node-modules --chown=gdk:gdk /home/gdk/gitlab-development-kit/gitlab/node_modules ./gitlab/node_modules/ + # Copy code COPY --chown=gdk:gdk ./ ./gitlab/ COPY --chown=gdk:gdk qa/gdk/entrypoint ../ -# Create missing pids folder and sync compiled workhorse -RUN mkdir -p gitlab/tmp/pids \ - && rsync -a --remove-source-files workhorse/ gitlab/workhorse/ - # Set up GDK -RUN SKIP_WORKHORSE_SETUP=true SKIP_GITLAB_SHELL_SETUP=true SKIP_GITALY_SETUP=true \ +RUN set -eux; \ + # We need to init git repository within docker build because external .git folder + # will always invalidate cache on 'COPY --chown=gdk:gdk ./ ./gitlab/' step and some gdk setup steps require gitlab + # to be an actual git repository + (cd gitlab && git init . && git add --all && git commit --quiet -m "Init repository") &> /dev/null; \ + SKIP_WORKHORSE_SETUP=true SKIP_GITLAB_SHELL_SETUP=true SKIP_GITALY_SETUP=true \ make redis/redis.conf all \ && gdk kill diff --git a/qa/gdk/Dockerfile.gdk.dockerignore b/qa/gdk/Dockerfile.gdk.dockerignore index 6094d8e817c..ce7f2ae3d37 100644 --- a/qa/gdk/Dockerfile.gdk.dockerignore +++ b/qa/gdk/Dockerfile.gdk.dockerignore @@ -1,3 +1,5 @@ +.go/ +.git/ .bundle/ .gitlab/ .lefthook/ @@ -10,9 +12,8 @@ data/ doc/ rubocop/ storybook/ -log/*.log node_modules/ -tmp/* +log/*.log .eslint* .gitlab-ci.yml @@ -29,6 +30,12 @@ tests.yml *.md +tmp/* +!tmp/feature_flags +!tmp/pids +!tmp/prometheus_multiproc_dir +!tmp/sockets + db/fixtures/ !db/fixtures/development/01_admin.rb !db/fixtures/development/02_application_settings.rb diff --git a/qa/gdk/entrypoint b/qa/gdk/entrypoint index 3b86f19b9b2..62403648885 100755 --- a/qa/gdk/entrypoint +++ b/qa/gdk/entrypoint @@ -8,14 +8,6 @@ set -e # from outside the container echo "$(hostname -i) gdk.test" | sudo tee -a /etc/hosts > /dev/null -# make sure we don't override existing BUNDLE_PATH which happens on CI where all job variables are also passed in to service -unset BUNDLE_PATH - gdk start -# /builds folder is present when running as a service on CI -if [ -d /builds ]; then - exec "$@" | tee -a /builds/gdk.log -else - exec "$@" | tee -a ${HOME}/gitlab-development-kit/gitlab/log/gdk.log -fi +exec "$@" | tee -a ${HOME}/gitlab-development-kit/gitlab/log/gdk.log diff --git a/scripts/build_gdk_image b/scripts/build_gdk_image index 8b1fdec2d7d..cb1dbd03adb 100755 --- a/scripts/build_gdk_image +++ b/scripts/build_gdk_image @@ -8,10 +8,6 @@ REGISTRY="${CI_REGISTRY}/${CI_PROJECT_PATH}" SHA_TAG="${CI_COMMIT_SHA}" BRANCH_TAG="${CI_COMMIT_REF_SLUG}" -# Fetch ruby version based on contents of .ruby-version -RUBY_VERSION=$(cat .ruby-version) -RUBY_VERSION_MINOR=$(echo "$RUBY_VERSION" | awk -F. '{$3=0; OFS="."; print $1,$2,$3}') - IMAGE="${REGISTRY}/gitlab-qa-gdk" if [[ -n "${CI}" ]]; then @@ -20,17 +16,16 @@ else OUTPUT_OPTION="--load" fi -echoinfo "Building GDK image with GDK sha: '${GDK_SHA}'" "yes" +echoinfo "Building GDK image" "yes" docker buildx build \ - --cache-to="type=inline" \ - --cache-from="${IMAGE}:${BRANCH_TAG}" \ - --cache-from="${IMAGE}:master" \ + --cache-to="type=registry,mode=max,image-manifest=true,ref=${IMAGE}/cache:${BRANCH_TAG}" \ + --cache-from="${IMAGE}/cache:${BRANCH_TAG}" \ + --cache-from="${IMAGE}/cache:master" \ --file="qa/gdk/Dockerfile.gdk" \ --platform=${ARCH:-amd64} \ --tag="${IMAGE}:${SHA_TAG}" \ --tag="${IMAGE}:${BRANCH_TAG}" \ - --build-arg="GEM_CACHE=/home/gdk/.asdf/installs/ruby/${RUBY_VERSION}/lib/ruby/gems/${RUBY_VERSION_MINOR}/cache" \ ${OUTPUT_OPTION} \ . diff --git a/spec/models/work_item_spec.rb b/spec/models/work_item_spec.rb index 936b24b7079..c58a1fb172b 100644 --- a/spec/models/work_item_spec.rb +++ b/spec/models/work_item_spec.rb @@ -165,7 +165,7 @@ RSpec.describe WorkItem, feature_category: :portfolio_management do subject { work_item.supported_quick_action_commands } it 'returns quick action commands supported for all work items' do - is_expected.to include(:title, :reopen, :close, :cc, :tableflip, :shrug, :type, :promote_to) + is_expected.to include(:title, :reopen, :close, :cc, :tableflip, :shrug, :type, :promote_to, :checkin_reminder) end context 'when work item supports the assignee widget' do diff --git a/spec/services/admin/abuse_reports/moderate_user_service_spec.rb b/spec/services/admin/abuse_reports/moderate_user_service_spec.rb index 6e8a59f4e49..7e08db2b612 100644 --- a/spec/services/admin/abuse_reports/moderate_user_service_spec.rb +++ b/spec/services/admin/abuse_reports/moderate_user_service_spec.rb @@ -4,6 +4,10 @@ require 'spec_helper' RSpec.describe Admin::AbuseReports::ModerateUserService, feature_category: :instance_resiliency do let_it_be_with_reload(:abuse_report) { create(:abuse_report) } + let_it_be_with_reload(:similar_abuse_report) do + create(:abuse_report, user: abuse_report.user, category: abuse_report.category) + end + let(:action) { 'ban_user' } let(:close) { true } let(:reason) { 'spam' } @@ -26,6 +30,12 @@ RSpec.describe Admin::AbuseReports::ModerateUserService, feature_category: :inst it 'closes the report' do expect { subject }.to change { abuse_report.closed? }.from(false).to(true) end + + context 'when similar open reports for the user exist' do + it 'closes the similar report' do + expect { subject }.to change { similar_abuse_report.reload.closed? }.from(false).to(true) + end + end end shared_examples 'does not close the report' do @@ -33,6 +43,13 @@ RSpec.describe Admin::AbuseReports::ModerateUserService, feature_category: :inst subject expect(abuse_report.closed?).to be(false) end + + context 'when similar open reports for the user exist' do + it 'does not close the similar report' do + subject + expect(similar_abuse_report.reload.closed?).to be(false) + end + end end shared_examples 'does not record an event' do |