Ankush Menat
3bb70a905d
fix: restrict method types in few whitelisted funcs ( #32984 )
2025-06-18 11:02:57 +05:30
Sagar Vora
628ddfd494
perf: remove repeated calls to get_permitted_fieldnames
2025-03-16 23:39:46 +05:30
gavin
38fd079be5
Merge pull request #31296 from hyaray/patch-10
...
fix: Translate {doctype} in realtime message for reportview.delete_items
2025-03-06 17:25:49 +01:00
hyaray
7fd0516524
fix: Translate {doctype} in realtime message for reportview.delete_items
2025-03-06 17:15:49 +01:00
sokumon
992651153d
fix: correct data while exporting with translate values
2025-03-05 00:29:42 +05:30
Ankush Menat
67fafdd812
perf: Set timeout in same query / avoid side effects
2025-01-25 10:22:08 +05:30
Ankush Menat
658e6c5e73
perf: Hard-limit get_count runtime to 1 second
...
We have limited count to 1000 by default but this can still easily read
entire table if:
- There are filters and filters don't use index and there aren't 1000
matching rows.
This unknown tail latency by default is not acceptable, so by default
any count query that fails to return results in 2 seconds will be
terminated and user will have to explicitly ask for the count.
2025-01-25 10:15:48 +05:30
Ankush Menat
32054b0757
refactor: use response_headers to set cache control headers
2025-01-24 18:35:26 +05:30
Ankush Menat
930d006f4c
perf: HTTP cache list view counts when count is >1000 ( #29871 )
...
This allows for caching the count which are frequently requested but
rarely change and even if they changed, UI doesn't show accurate value
to begin with.
After this change any filters that result in "1,000+" response will be
just cached by client and won't be requested again and again (for at
least 30 minutes, it's SWR after that so UI should still be snappy)
2025-01-21 14:55:58 +05:30
Ankush Menat
d3dd7651dc
perf: cache parsed fields aggresively
...
These are just simple strings, and default of 128 isn't enough. Just 4-5
list views will fill that up.
2025-01-07 12:10:11 +05:30
Sumit Bhanushali
9a331d30c6
chore: fix for failing test
...
(cherry picked from commit 0f3dad71e69e829171ac7c48de065f797a1357bd)
2024-12-09 07:22:33 +00:00
Sumit Bhanushali
5d22ee7b2b
fix: check at doc level when if owner role permission is checked during export from report view
...
(cherry picked from commit c7ad3296c9664f5d6b2946f46082f57b91c1bac8)
2024-12-09 07:22:32 +00:00
Akhil Narang
84ef6ec677
refactor: fixup with ruff 0.8.1
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-04 13:18:04 +05:30
David
74e5c61ec4
feat: set flag during bulk delete c/o doc on_trash event
2024-09-30 06:52:44 +02:00
avc
cf263e41b7
refactor: use getattr fallback instead conditional to get translatable
...
Co-authored-by: Akhil Narang <me@akhilnarang.dev>
2024-09-09 09:59:58 +02:00
git-avc
d144afac64
fix: handle aggregate columns
2024-07-22 01:21:07 +02:00
git-avc
965b992a22
fix: get label instead fieldname & discard int for get form_param
2024-07-21 23:59:12 +02:00
git-avc
9c89b3806a
fix: always translate labels
2024-07-21 22:22:48 +02:00
git-avc
37487cb4c1
feat: translate values option in export dialog
2024-07-21 22:21:36 +02:00
git-avc
0e730335b9
fix: exclude text editor
2024-07-21 21:36:16 +02:00
git-avc
9c44a85ceb
refactor: consider fieldtype for translation
2024-07-21 21:33:48 +02:00
git-avc
0fca3a3cdd
fix: let's translate data on report excel exporting
2024-07-15 22:03:02 +02:00
Ankush Menat
820a6edae8
fix: Skip virtual fields in all select queries ( #26700 )
2024-06-06 09:43:36 +00:00
KlausH09
6b0d9e4bb2
fix: child table field wildcard in API ( #26543 )
2024-05-24 10:31:05 +00:00
Ankush Menat
926c888374
fix(UX): bulk delete error messages
2024-04-29 10:59:39 +05:30
Ankush Menat
f642b1881f
fix: invalid select star expansions
2024-03-20 16:31:02 +05:30
Ankush Menat
5eca52b2c7
fix: only trim tab if it starts with tab
2024-03-20 12:29:58 +05:30
Ankush Menat
cc4e628edf
fix: remove unnecessary dummy column
2024-03-20 12:29:58 +05:30
Ankush Menat
3facad0a25
fix: avoid parsing reserved keywords and simple strings
2024-03-20 12:29:58 +05:30
Ankush Menat
414b1beffd
Revert "Revert "perf: cache fieldname extraction""
...
This reverts commit ffe84c9f9d .
2024-03-20 12:29:58 +05:30
Ankush Menat
ea193ecd48
Revert "Revert "fix: search_link fails when txt contains parentheses ( #22892 )""
...
This reverts commit c0cf13b8e8 .
2024-03-20 12:29:57 +05:30
Ankush Menat
dbe55d4ace
perf: Avoid ordering in count query ( #25451 )
...
Order doesn't matter for count. This PR now actually makes https://github.com/frappe/frappe/pull/25348 effective
2024-03-14 15:03:27 +00:00
Ankush Menat
1fa7cc7816
fix: support child tables in count with limit
2024-03-12 13:17:31 +05:30
Ankush Menat
7e88c53aa4
perf: show estimated count on list view
2024-03-12 13:17:31 +05:30
Ankush Menat
a49fafbf8e
feat: support countig till a limit
...
In InnoDB counting is essentially O(n) operation, it can be pretty fast
on indexes but when filters don't use any index it usually means doing a
full table scan.
Adding a limit will stop the scan as soon as that many records are
matched.
2024-03-12 13:17:28 +05:30
Ankush Menat
ae649aadf0
fix: dont add useless distinct clause
...
confuses query planner in some cases
2024-03-12 09:18:07 +05:30
Ankush Menat
4ab2ccd01f
fix!: get_count accepts splatted arguments
2024-03-11 18:15:27 +05:30
Ankush Menat
a28921750d
fix(DX): Avoid use of args in virtual doctype
2024-03-11 15:20:35 +05:30
Akhil Narang
3f1e19de85
refactor(treewide): enable RUF rules
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-21 16:20:28 +05:30
Akhil Narang
26ae0f3460
fix: ruff fixes
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-07 17:04:31 +05:30
Ankush Menat
de9ac89748
style: re-format with ruff
2024-02-05 18:53:33 +05:30
Ankush Menat
c0cf13b8e8
Revert "fix: search_link fails when txt contains parentheses ( #22892 )"
...
This reverts commit 642e9f4ec1 .
2024-01-17 12:44:20 +05:30
Ankush Menat
ffe84c9f9d
Revert "perf: cache fieldname extraction"
...
This reverts commit c591fcc5c1 .
2024-01-17 12:44:09 +05:30
Ankush Menat
c591fcc5c1
perf: cache fieldname extraction
2024-01-17 11:50:13 +05:30
Sambasiva Suda
642e9f4ec1
fix: search_link fails when txt contains parentheses ( #22892 )
...
* fix: search_link fails when txt contains parentheses
* fix: updating regex to replace number params also
* chore: replacing regex with sqlparse
* chore: not including fields like count(1) in asterisk_fields
* fix: owner/module not identified as column
* chore: lint fix and removing exception
* refactor: better function name
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-01-16 21:36:45 +05:30
Suraj Shetty
2564d0e939
Merge pull request #23512 from GursheenK/include-filter-values-in-exported-report-excel
2023-12-18 12:40:37 +05:30
barredterra
c35476256f
refactor: simplify conditional logic
...
Command: `sourcery review --fix --enable de-morgan .`
2023-12-05 11:14:41 +01:00
Gursheen Anand
8a4d85a5ad
fix: parse applied filter json before building data
2023-11-30 15:07:30 +05:30
mergify[bot]
d3c534e0cf
fix: attempt to not pass an empty string to json.loads ( #23139 ) ( #23141 )
...
* fix: attempt to not pass an empty string to `json.loads`
* fix: ignore all falsy fields
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 6a8cf0689ae8e70f99ffd6957603d6583b4bdf92)
Co-authored-by: Arjun <contact@arjunchoudhary.com>
2023-11-07 20:04:20 +05:30
Ankush Menat
dfcb69ab21
refactor: use reportview get_count implementation
...
Count reported should be according to permissions
2023-10-16 18:13:50 +05:30