From 73b1049a46da18c885e2c69dab1e8f656cbd6130 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 31 Dec 2020 15:10:32 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- app/controllers/admin/application_settings_controller.rb | 2 +- app/controllers/projects/usage_ping_controller.rb | 2 +- app/views/notify/issue_due_email.html.haml | 2 +- app/views/notify/issue_due_email.text.erb | 2 +- app/workers/all_queues.yml | 2 +- app/workers/gitlab_usage_ping_worker.rb | 2 +- changelogs/unreleased/cablett-issue-due.yml | 5 +++++ config/feature_categories.yml | 4 ++-- lib/api/usage_data.rb | 2 +- spec/mailers/notify_spec.rb | 4 ++++ 10 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 changelogs/unreleased/cablett-issue-due.yml diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 56ec10fa43a..179e6ef60fb 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -31,7 +31,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController feature_category :source_code_management, [:repository, :clear_repository_check_states] feature_category :continuous_integration, [:ci_cd, :reset_registration_token] - feature_category :collection, [:usage_data] + feature_category :usage_ping, [:usage_data] feature_category :integrations, [:integrations] feature_category :pages, [:lets_encrypt_terms_of_service] diff --git a/app/controllers/projects/usage_ping_controller.rb b/app/controllers/projects/usage_ping_controller.rb index 9b4ddb326c1..77ee53f2e5d 100644 --- a/app/controllers/projects/usage_ping_controller.rb +++ b/app/controllers/projects/usage_ping_controller.rb @@ -3,7 +3,7 @@ class Projects::UsagePingController < Projects::ApplicationController before_action :authenticate_user! - feature_category :collection + feature_category :usage_ping def web_ide_clientside_preview return render_404 unless Gitlab::CurrentSettings.web_ide_clientside_preview_enabled? diff --git a/app/views/notify/issue_due_email.html.haml b/app/views/notify/issue_due_email.html.haml index 08bc98ca05c..adb9da05694 100644 --- a/app/views/notify/issue_due_email.html.haml +++ b/app/views/notify/issue_due_email.html.haml @@ -1,5 +1,5 @@ %p.details - #{link_to @issue.author_name, user_url(@issue.author)}'s issue is due soon. + #{link_to @issue.author_name, user_url(@issue.author)}'s issue #{issue_reference_link(@issue)} is due soon. - if @issue.assignees.any? %p diff --git a/app/views/notify/issue_due_email.text.erb b/app/views/notify/issue_due_email.text.erb index ae50b703fe3..e5bfcc70355 100644 --- a/app/views/notify/issue_due_email.text.erb +++ b/app/views/notify/issue_due_email.text.erb @@ -1,6 +1,6 @@ The following issue is due on <%= @issue.due_date %>: -Issue <%= @issue.iid %>: <%= url_for(project_issue_url(@issue.project, @issue)) %> +Issue <%= @issue.iid %>: <%= issue_reference_link(@issue) %> Author: <%= @issue.author_name %> <%= assignees_label(@issue) %> diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 082937f8d78..6f4e60d5c69 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -188,7 +188,7 @@ :idempotent: :tags: [] - :name: cronjob:gitlab_usage_ping - :feature_category: :collection + :feature_category: :usage_ping :has_external_dependencies: :urgency: :low :resource_boundary: :unknown diff --git a/app/workers/gitlab_usage_ping_worker.rb b/app/workers/gitlab_usage_ping_worker.rb index 1bb600bbd13..782b089261f 100644 --- a/app/workers/gitlab_usage_ping_worker.rb +++ b/app/workers/gitlab_usage_ping_worker.rb @@ -8,7 +8,7 @@ class GitlabUsagePingWorker # rubocop:disable Scalability/IdempotentWorker include CronjobQueue # rubocop:disable Scalability/CronWorkerContext include Gitlab::ExclusiveLeaseHelpers - feature_category :collection + feature_category :usage_ping sidekiq_options retry: 3, dead: false sidekiq_retry_in { |count| (count + 1) * 8.hours.to_i } diff --git a/changelogs/unreleased/cablett-issue-due.yml b/changelogs/unreleased/cablett-issue-due.yml new file mode 100644 index 00000000000..82d433bdf93 --- /dev/null +++ b/changelogs/unreleased/cablett-issue-due.yml @@ -0,0 +1,5 @@ +--- +title: Add issue link to due date emails +merge_request: 50642 +author: +type: changed diff --git a/config/feature_categories.yml b/config/feature_categories.yml index 2b6f8fc51db..805cc3b50a3 100644 --- a/config/feature_categories.yml +++ b/config/feature_categories.yml @@ -9,7 +9,6 @@ --- - accessibility_testing - advanced_deployments -- analysis - api - attack_emulation - audit_events @@ -25,7 +24,6 @@ - code_quality - code_review - code_testing -- collection - compliance_management - container_host_security - container_network_security @@ -83,6 +81,7 @@ - pages - pipeline_authoring - planning_analytics +- privacy_control_center - product_analytics - projects - provision @@ -112,6 +111,7 @@ - time_tracking - tracing - usability_testing +- usage_ping - users - value_stream_management - vulnerability_database diff --git a/lib/api/usage_data.rb b/lib/api/usage_data.rb index cad2f52e951..c7d63f8d6ac 100644 --- a/lib/api/usage_data.rb +++ b/lib/api/usage_data.rb @@ -4,7 +4,7 @@ module API class UsageData < ::API::Base before { authenticate! } - feature_category :collection + feature_category :usage_ping namespace 'usage_data' do before do diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 3ebc2fc1e36..ab45f9472a3 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -224,6 +224,10 @@ RSpec.describe Notify do let(:model) { issue } end + it 'contains a link to the issue' do + is_expected.to have_body_text(issue.to_reference(full: false)) + end + it_behaves_like 'it should show Gmail Actions View Issue link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled'