Advanced Search: redirect single sha result for project search
requested to merge 233278-in-global-search-if-there-is-only-one-result-redirect-to-that-page-instead-of-global-search into master
What does this MR do?
Basic search already allowed Project scoped searches for SHA with a single result returned for commits
to redirect to that result. The redirect would only happen if no other results were returned.
This MR changes:
- Enable redirect for Advanced Searches
- Remove calls to perform search and redirect if search is project scoped, a commit can be found, and user has permission
- Redirect happens always if a SHA is used for search term
- Add flash notice was added to let the user know why the redirection happened. Include link that allows them to go back to search results.
- Removed code no longer needed
- Added more specs
- Updated documentation with a screenshot
Issue #233278 (closed)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Terri Chu