summaryrefslogtreecommitdiff
path: root/app/controllers/projects/issues_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/issues_controller.rb')
-rw-r--r--app/controllers/projects/issues_controller.rb24
1 files changed, 18 insertions, 6 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index 7f0d23b79ce..9a8965dbeb6 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -44,8 +44,6 @@ class Projects::IssuesController < Projects::ApplicationController
push_frontend_feature_flag(:vue_issuable_sidebar, project.group)
push_frontend_feature_flag(:tribute_autocomplete, @project)
push_frontend_feature_flag(:vue_issuables_list, project)
- push_frontend_feature_flag(:design_management_todo_button, project, default_enabled: true)
- push_frontend_feature_flag(:vue_sidebar_labels, @project)
end
before_action only: :show do
@@ -53,10 +51,13 @@ class Projects::IssuesController < Projects::ApplicationController
real_time_enabled = Gitlab::ActionCable::Config.in_app? || Feature.enabled?(real_time_feature_flag, @project)
gon.push({ features: { real_time_feature_flag.to_s.camelize(:lower) => real_time_enabled } }, true)
+
+ record_experiment_user(:invite_members_version_a)
+ record_experiment_user(:invite_members_version_b)
end
before_action only: :index do
- push_frontend_feature_flag(:scoped_labels, @project)
+ push_frontend_feature_flag(:scoped_labels, @project, type: :licensed)
end
around_action :allow_gitaly_ref_name_caching, only: [:discussions]
@@ -65,6 +66,17 @@ class Projects::IssuesController < Projects::ApplicationController
alias_method :designs, :show
+ feature_category :issue_tracking, [
+ :index, :calendar, :show, :new, :create, :edit, :update,
+ :destroy, :move, :reorder, :designs, :toggle_subscription,
+ :discussions, :bulk_update, :realtime_changes,
+ :toggle_award_emoji, :mark_as_spam, :related_branches,
+ :can_create_branch, :create_merge_request
+ ]
+
+ feature_category :service_desk, [:service_desk]
+ feature_category :importers, [:import_csv, :export_csv]
+
def index
@issues = @issuables
@@ -204,7 +216,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
def export_csv
- ExportCsvWorker.perform_async(current_user.id, project.id, finder_options.to_h) # rubocop:disable CodeReuse/Worker
+ IssuableExportCsvWorker.perform_async(:issue, current_user.id, project.id, finder_options.to_h) # rubocop:disable CodeReuse/Worker
index_path = project_issues_path(project)
message = _('Your CSV export has started. It will be emailed to %{email} when complete.') % { email: current_user.notification_email }
@@ -239,7 +251,7 @@ class Projects::IssuesController < Projects::ApplicationController
return @issue if defined?(@issue)
# The Sortable default scope causes performance issues when used with find_by
- @issuable = @noteable = @issue ||= @project.issues.includes(author: :status).where(iid: params[:id]).reorder(nil).take!
+ @issuable = @noteable = @issue ||= @project.issues.inc_relations_for_view.iid_in(params[:id]).without_order.take!
@note = @project.notes.new(noteable: @issuable)
return render_404 unless can?(current_user, :read_issue, @issue)
@@ -313,7 +325,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
def store_uri
- if request.get? && !request.xhr?
+ if request.get? && request.format.html?
store_location_for :user, request.fullpath
end
end