Added Sort by Popularity to Advanced Search for Issues and MRs
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=263365) </details> <!--IssueSummary end--> ###Steps for this issue #### ~"workflow::planning breakdown" - Close this issue and make the new issue for MRs to have the sort. Issues Sort is complete. - Link to the epic that has the user feedback and research regarding the origin of the need. - In the new issue, add the details explaining the analysis for why this will only be available in Advanced Search. - this is inconsistent for Issues, as issues has Sort By popularity for Basic and Advanced Search. ## Actionable Insights Some users found value in seeing the number of upvotes/likes on issues and MRs in the results page, and being able to sort by this. **Why:** A couple users mentioned that this indicator can help them in understanding and prioritizing issues that have the most support or backing. **Action:** Add the ability to sort Issues and MRs by the number of upvotes/likes they have. #### Link - Dovetail Insight: https://dovetailapp.com/projects/f0681af5-e9c6-41d3-809c-b102071429e7/insights/present/ebbb2fa6-c405-4718-8ff1-95c7611bc9e6 - Research Issue: https://gitlab.com/gitlab-org/ux-research/-/issues/1043 ## Plan 1. Add upvotes to issues index: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64683 1. Add `upvotes_count` column to `issues` table: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65250 1. Add sort by popularity for `issues` scope behind a new feature flag: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65452 1. Rollout the `search_sort_issues_by_popularity` feature flag on production incrementally: https://gitlab.com/gitlab-org/gitlab/-/issues/334974 1. Remove or enable the `search_sort_issues_by_popularity` feature flag by default if everything's stable 1. Add the `upvotes` field to the merge_requests index: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66671 1. ~~Add the `upvotes_count` column to the `merge_requests` table (similar to ). This step might take some time to prove ~database reviewers/maintainers that it's worth it.~~: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67343 (not doing) 1. Add the sort by popularity for the `merge_requests` scope behind a new feature flag 1. Rollout this new feature flag on production 1. Remove or enable the feature flag by default if everything's stable ## Development This has already been implemented for Issues (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65452). We had to revert adding it to Merge Requests (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70944), so that is all that remains for this issue. - [x] Add sort by popularity to Issues - [ ] Add sort by popularity to Merge Requests ## Release Notes Customers who use upvoting for Issues and MR prioritization have difficulty doing this across multiple groups and projects. In 14.2, users can see the number of Upvotes and sort by most popular, which shows the issues with the most upvotes first. If upgrading to 14.2 this feature will take 5 to 30 minutes to update the indexing with the new field. ![Screen_Shot_2021-08-06_at_10.30.39_AM](/uploads/3afcbb60ed01ae29219de94a51b70387/Screen_Shot_2021-08-06_at_10.30.39_AM.png) https://docs.gitlab.com/ee/user/search/advanced_search.html <!-- Old Title: Add the ability to sort Issues/MRs by the number of upvotes/likes on the Global Search results page >
issue