Allow event_filter to be set via GET/POST in addition to cookie
What does this MR do?
Allows event_filter to be set via GET (and POST) in addition to cookie
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Make it easier to send filters.
What are the relevant issue numbers?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added - [ -] Documentation created/updated
- [ -] API support added
- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together Closes #1801 (moved)
Merge request reports
Activity
Marked the task CHANGELOG entry added as completed
Marked the task Conform by the style guides as completed
Marked the task Squashed related commits together as completed
@muteor thank you for the contribution and I'm sorry that it got lost among other merge requests. Can you replicate for change for the current version of GitLab? /cc @ClemMakesApps
added 9044 commits
-
60f4a308...cad8724e - 9043 commits from branch
gitlab-org:master
- 1e8b7973 - Allow event_filter to be set via GET/POST in addition to cookie
-
60f4a308...cad8724e - 9043 commits from branch
@adamniedzielski Have rebased, this should be good to go now.
Thanks Keith
1270 1270 - Fix skip_repo parameter being ignored when destroying a namespace 1271 1271 - Add all builds into stage/job dropdowns on builds page 1272 1272 - Change requests_profiles resource constraint to catch virtually any file 1273 - Allow event_filter to be set via GET/POST in addition to cookie (muteor) We changed our workflow for handling CHANGELOG - please take a look at https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/changelog.md.
192 192 def event_filter 193 193 # Split using comma to maintain backward compatibility Ex/ "filter1,filter2" 194 194 filters = cookies['event_filter'].split(',')[0] if cookies['event_filter'].present? 195 filters = params[:event_filter].split(',') if params[:event_filter].present? Why do we want to use
split
here? In the previous line we usesplit(',')[0]
to get the first filter out of the comma separated list, but as the comment above explains, it's only for legacy reasons. It looks likeEventFilter
only accepts a single filter now. However,EventFilter
code is really confusing right now. It accepts a string but it refers to it as params .@muteor I'm sorry, I missed your comment. I think that we should only accept a single filter.
@muteor Thank you so much for getting back to this!
I think that we should also pass these parameters when generating URLs to the RSS feeds. If we don't do that, basically nobody will discover this option.
mentioned in issue #1801 (moved)
mentioned in merge request !13342