From 610a1f81b64d14dd82dbbdae9b6aecaeb8861853 Mon Sep 17 00:00:00 2001 From: Caio Almeida <117518+caiosba@users.noreply.github.com> Date: Tue, 21 Jan 2025 13:57:49 -0300 Subject: [PATCH] "Choose an existing article" should search all articles, not just relevant ones, when relevant articles are available. (#2255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, when relevant articles are available, "Choose an existing article" only searches among them. This is problematic because the “Choose an existing article” button is meant to serve as a “manual” fallback solution when the relevant articles do not include the one the user is looking for. Fixes: CV2-6024. --- src/app/components/article/MediaArticlesTeamArticles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/article/MediaArticlesTeamArticles.js b/src/app/components/article/MediaArticlesTeamArticles.js index 4bcb57fa1a..d016687b33 100644 --- a/src/app/components/article/MediaArticlesTeamArticles.js +++ b/src/app/components/article/MediaArticlesTeamArticles.js @@ -135,7 +135,7 @@ const MediaArticlesTeamArticles = ({ let articles = []; let hasRelevantArticles = false; // If there are relevant articles, we prioritize and display them - if (props.project_media.relevant_articles_count > 0) { + if (props.project_media.relevant_articles_count > 0 && !textSearch) { hasRelevantArticles = true; articles = props.project_media.relevant_articles.edges.map(edge => edge.node); } else {