From f579d4dbd66f73056fa92bc23e639078a0d2254e Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 2 Feb 2017 17:39:10 +0100 Subject: [PATCH] display organization when searching for views --- .../src/main/js/app/components/nav/global/SearchView.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js b/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js index 070d80e993c..4976ff11348 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js +++ b/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js @@ -39,6 +39,8 @@ type Finding = { extra?: string }; +const SHOW_ORGANIZATION_FOR_QUALIFIERS = ['TRK', 'VW', 'SVW']; + const SearchItemView = Marionette.ItemView.extend({ tagName: 'li', template: SearchItemTemplate, @@ -214,7 +216,8 @@ export default Marionette.LayoutView.extend({ const collection = []; r.results.forEach(({ items, q }) => { items.forEach((item, index) => { - const showOrganization = customOrganizations && item.organization != null && q === 'TRK'; + const showOrganization = customOrganizations && item.organization != null && + SHOW_ORGANIZATION_FOR_QUALIFIERS.includes(q); const organization = showOrganization ? getOrganization(item.organization) : null; collection.push({ ...item, -- 2.39.5