Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(query_doctypes): Allow search in translated name #22590

Merged
merged 3 commits into from
Oct 16, 2023

Conversation

cogk
Copy link
Contributor

@cogk cogk commented Sep 29, 2023

When searching for a DocType while adding a Shortcut block in a workspace, I'm using my language (i.e. French), but the search only works in English.

await frappe.call("frappe.desk.search.search_link", {
  txt: "Article",  // 'Article' means Item in French
  filters: { "user": "french@example.com" },
  query: "frappe.core.report.permitted_documents_for_user.permitted_documents_for_user.query_doctypes",
  doctype: "DocType",
  reference_doctype: "",
});
// results -> empty

Used in two locations:

query: "frappe.core.report.permitted_documents_for_user.permitted_documents_for_user.query_doctypes",

query: "frappe.core.report.permitted_documents_for_user.permitted_documents_for_user.query_doctypes",

no-docs

@cogk cogk requested review from a team and surajshetty3416 and removed request for a team September 29, 2023 15:13
@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Merging #22590 (74dfb8a) into develop (258c175) will decrease coverage by 0.07%.
Report is 1 commits behind head on develop.
The diff coverage is n/a.

❗ Current head 74dfb8a differs from pull request most recent head 7a825fe. Consider uploading reports for the commit 7a825fe to get more accurate results

@@             Coverage Diff             @@
##           develop   #22590      +/-   ##
===========================================
- Coverage    62.36%   62.30%   -0.07%     
===========================================
  Files          768      768              
  Lines        73575    73520      -55     
  Branches      6340     6337       -3     
===========================================
- Hits         45888    45808      -80     
- Misses       24096    24123      +27     
+ Partials      3591     3589       -2     
Flag Coverage Δ
server 66.40% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@stale
Copy link

stale bot commented Oct 14, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Oct 14, 2023
@stale stale bot removed the inactive label Oct 16, 2023
@ankush ankush merged commit 89aab5d into frappe:develop Oct 16, 2023
21 checks passed
@ankush ankush added the backport version-14-hotfix backport to version 14 label Oct 16, 2023
mergify bot pushed a commit that referenced this pull request Oct 16, 2023
* fix(query_doctypes): Allow search in translated name

* test: Add test for DocType search in foreign language

(cherry picked from commit 89aab5d)

# Conflicts:
#	frappe/core/report/permitted_documents_for_user/permitted_documents_for_user.py
surajshetty3416 added a commit that referenced this pull request Oct 30, 2023
#22748)

Co-authored-by: Corentin Flr <10946971+cogk@users.noreply.github.com>
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
fix(query_doctypes): Allow search in translated name (#22590)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants