Probable bug: when sort issues by weight, it drops label filter

Summary

When you pick a label filter for issues in /issues page and then sort by weight (both more/less) it drops label filter. Was it done by reason or by mistake? It seems like unexpected behavior to me.

How to reproduce

  1. go to gitlab.com/gitlab-org/gitlab-ce/issues
  2. pick any label(s) in filter panel
  3. try to sort by More weight OR Less weight

Then you'll see that previously selected label filter just dropped. It behaves like that only for weight

Expected behavior

I expect that this sort shouldn't drop filter

Possible fixes

I can fix it myself if you confirm that it is unexpected behavior

Also

Don't you think the weight order behavior is strange, it sorts like 0, 1,2 .. 10 and then entities with undefined weight, and basically when you choose More weight, you get all the entities without weight set in the beginning. I think we always want to have entities with defined weight first, and then remaining list

Assignee Loading
Time tracking Loading