From 65cf805278c1d865ee0543508de92d5f4ecae4f0 Mon Sep 17 00:00:00 2001 From: Igor Kapkov Date: Mon, 7 Aug 2017 22:56:24 +1000 Subject: [PATCH] Allow events filter to be set in the URL in addition to cookie --- app/controllers/application_controller.rb | 1 + .../1801-allow-event_filter-to-be-set-in-the-url.yml | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 changelogs/unreleased/1801-allow-event_filter-to-be-set-in-the-url.yml diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index fb2808edf47..81b538b97ba 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -275,6 +275,7 @@ class ApplicationController < ActionController::Base def event_filter # Split using comma to maintain backward compatibility Ex/ "filter1,filter2" filters = cookies['event_filter'].split(',')[0] if cookies['event_filter'].present? + filters = params[:event_filter].split(',')[0] if params[:event_filter].present? @event_filter ||= EventFilter.new(filters) end diff --git a/changelogs/unreleased/1801-allow-event_filter-to-be-set-in-the-url.yml b/changelogs/unreleased/1801-allow-event_filter-to-be-set-in-the-url.yml new file mode 100644 index 00000000000..4ceaa7e3139 --- /dev/null +++ b/changelogs/unreleased/1801-allow-event_filter-to-be-set-in-the-url.yml @@ -0,0 +1,5 @@ +--- +title: "Allow events filter to be set in the URL in addition to cookie" +merge_request: 21557 +author: Igor @igas +type: added