Clicking on labels in MR sidebar filters Issues list with clicked label instead of MR list
Summary
When we are viewing an Issue, and when we click one of the labels on the sidebar after adding/removing labels, it takes us to Issues list filtered by clicked label.
But when we're viewing an MR, then too clicking on label from the sidebar takes us to Issues list filtered by clicked label instead of MR list.
Steps to reproduce
- Open an existing MR
- Add/remove labels from the sidebar
- Do not reload the page, just click one of the labels
- Page navigates to Issues list filtered by clicked label
Expected Behaviour
Page should navigate to MR list filtered by clicked label
Actual Behaviour
Page navigates to Issues list filtered by clicked label
Possible Fix
This is because word issues
is hard-coded in app/assets/javascripts/labels_select.js#L60
while computing filter URL when labels are added or removed, and since issueUpdateURL
in line above already has necessary base path for list, we can update URL computation to be dynamic.
Edited by Kushal Pandya