* fix(utils): add type hints to whitelisted methods
* fix(desktop): add type hints to whitelisted methods
* fix(listview): add type hints to whitelisted methods
* fix(access_log): add type hints to whitelisted methods
* fix(setup_wizard): add type hints to whitelisted methods
* fix(notification_settings): add type hints to whitelisted methods
* fix(calendar): add type hints to whitelisted methods
* fix(notifications): add type hints to whitelisted methods
* fix(query_report): add type hints to whitelisted methods
* fix(load): add type hints to whitelisted methods
* fix(save): add type hints to whitelisted methods
* fix(user): add type hints to whitelisted methods
* fix: correct Document import
* fix(list_view_settings): add type hints to whitelisted methods
* fix(reportview): add type hints to whitelisted methods
* fix(treeview): add type hints to whitelisted methods
* fix(linked_with): add type hints to whitelisted methods
* fix(bulk_update): add type hints to whitelisted methods
* fix(assign_to): add type hints to whitelisted methods
* fix(workspace): add type hints to whitelisted methods
* fix(kanban_board): add type hints to whitelisted methods
* fix(event): add type hints to whitelisted methods
* fix(email): add type hints to whitelisted methods
* fix(exporter): add type hints to whitelisted methods
* fix(permission_manager): add type hints to whitelisted methods
* fix(dashboard_chart): add type hints to whitelisted methods
* fix(number_card): add type hints to whitelisted methods
* fix(tag): add type hints to whitelisted methods
* fix: add hook to force type hints on all whitelisted endpoints
* fix: target_doc can be dict/json string
* fix: doc can be dict/json string
* fix(tests): add type hints to whitelisted methods in test
* fix: tree method is optional
* test: Fix test api types
* chore: drop dead code
* fix: document can be int
* fix: Number card input can be document
As utils in some other API calls
* fix: Always use session user
The only usage of this API that makes sense.
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
* fix(workspace): show role-restricted non-public workspaces in sidebar
Non-public workspaces with assigned roles were not visible to users
with matching roles because the visibility logic only had two buckets:
public workspaces and private (for_user) workspaces. Role-restricted
non-public workspaces without a for_user value fell through both
conditions and were never shown.
Fixes#36201
* fix(workspace): use existing module in test to fix CI failure
The test was using "Test Module" via create_workspace() helper, but
get_module_app() could not resolve it in CI's fresh environment since
the module-app mapping cache did not include it. Use "Desk" module
which always exists.
* fix(workspace): use db.delete in test cleanup to bypass on_trash hook
The on_trash hook calls delete_from_my_workspaces() which tries to
fetch "Workspace Sidebar" doc that does not exist in CI. Using
frappe.db.delete bypasses document hooks and avoids the error.
if result is `[]` then it ignores cache and keeps hitting DB for no
reason.
(cherry picked from commit 20b63f3252f9b23655e34ca830cff426ad5a50a3)
Co-authored-by: Ankush Menat <ankush@frappe.io>
Optimize Workspace.save_page to call doc.save() only once therefore
eliminate sending unnecessary queries to database.
Signed-off-by: Xiaoguang Sun <sunxiaoguang@gmail.com>
Easy self-onboarding has been hardest to get right in complex business
apps, even though we have worked on this for long long time we have no
clear idea on how well it works, or if it's severly lacking.
We want to improve this by first understanding how efficient current
system is.
This PR adds basic telemetry for which steps are being completed, which
are skipped and what onboarding group is dismissed completely.