Commit graph

582 commits

Author SHA1 Message Date
MeIchthys
27f104bba6
fix: Don't set_status to 'Closed' when status is already "Closed" (#35621)
Co-authored-by: mgieger <mgieger@empirenatgas.com>
2026-01-05 13:08:30 +00:00
ismxilxrif
2f50f3174f
fix(desk): guard owner/modified_by access in update_user_info (#35581)
* fix(desk): guard owner/modified_by access in update_user_info

Fixes a regression introduced by #35557

This updates the code to safely check for the presence of those
fields using `getattr` before adding them to the uservlist. This
preserves the intended upstream behavior while avoiding
runtime errors for virtual/single/transient documents.

* chore: cache getattr instead of calling it twice

* refactor: less code

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2026-01-01 07:03:15 +00:00
Ankush Menat
e7598ec3a8
fix: Fetch user info for owner, modified_by and versions (#35557) 2025-12-31 07:56:26 +00:00
Ejaaz Khan
8824f6fb4d feat: minimal attachment view design 2025-12-26 16:53:53 +05:30
Akhil Narang
7a229d3c25
fix(getdoc): typo in docstring (#35380)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-12-22 06:33:31 +00:00
Ejaaz Khan
fbe22accb1 feat: re-design attachment and image section 2025-12-18 17:44:27 +05:30
Akhil Narang
2dcfe07ca8
refactor: make use of check_permission parameter for get_lazy_doc
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-12-10 16:52:26 +05:30
Aarol D'Souza
cf69e4bed1
fix(postgres): misc query building fixes + CI (#34831)
* fix(query): check standard field definitions

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* fix(postgres): fix order_by problem in pg

* fix(postgres): fix order_by in get_all for _test_connection_query

* fix: add check to a proper numeric fallback in _get_ifnull_fallback

* test(postgres): fix pg query used in assertion in test_permission_query

* fix(postgres): fix order_by in get_all for possible_link

* fix(postgres): fix order_by in get_all for set_modules

* fix(postgres): fix pg query count *

* fix(postgres): fix order_by in get_all for ask_pass_update

* fix(postgres): fix order_by statement in search_widget

* fix(postgres): fix order_by in get_list for get_stats

* test(postgres): normalize_sql for pg queries in test_arithmetic_operators_in_fields

* test(postgres): normalize_sql for pg queries in test_field_alias_in_group_by

* test(postgres): normalize_sql for pg queries in test_field_alias_permission_check

* test(postgres): fix order_by statement in get_all for test_db_keywords_as_fields

* test(postgres): fix order_by statement in get_all for test_prepare_select_args

* fix(treeview): use 0 instead of false to check since check field is an integer

* fix(postgres): fix order_by in get_all for sync_communication

* fix(postgres): fix order_by in get_all for get_references_across_doctypes_by_dynamic_link_field

* test(postgres): fix order_by in get_all for test_list_summary

* fix(postgres): fix order_by in get_all for email queries

* test(postgres): use order_by none and update assertion for postgres

* fix(postgres): use ILIKE to support case insensitive search in postgres

* test(test_query): update pg specific query assert to use ILIKE

* test(test_query): update test_nested_filters to use ilike instead for PG

* test(postgres): update pg query in assert to test updated qb query

* fix(search): update query to be db-agnostic

* test(postgres): normalize query for pg in test_build_match_conditions

* fix(postgres): suppress ORDER BY when SELECT DISTINCT in query for postgres specific behavior

* fix(postgres): suppress ORDER BY when GROUP BY is explicitly asked for pg specific behavior

* test(postgres): fix test behavior for pg ORDER BY drop when used with GROUP BY

* refactor: reducing noise in code by formatting code

* fix(query): use Star() to handle SQL wildcard character * correctly

* fix(postgres): display warning for ORDER BY fields that will be dropped

---------

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: Akhil Narang <me@akhilnarang.dev>
2025-12-05 10:30:49 +05:30
Hussain Nagaria
5fd6691548 fix: query placeholders 2025-11-28 11:40:05 +05:30
Hussain Nagaria
2b54da0219 fix: select correct number of rows in CTEs
Thanks @ankush for helping with this competetive coding task 😂
2025-11-27 22:36:57 +05:30
Hussain Nagaria
077c54a1a5
Merge branch 'develop' into perf/comm 2025-11-27 22:26:50 +05:30
Akhil Narang
df5080b45e
fix(linked_with): don't add tab prefix
query builder takes care of this

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-11-19 21:15:57 +05:30
Akhil Narang
977aee5ab3
refactor: backticks aren't allowed in order_by or group_by
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-11-19 21:15:57 +05:30
Hussain Nagaria
3c5affd359 refactor: use CTEs to get merged results 2025-11-12 12:44:21 +05:30
Saqib Ansari
d63363fc97 feat: show custom perm types in share dialog 2025-11-10 14:00:02 +05:30
Sagar Vora
a93530e221 Merge branch 'develop' into computed_child_table 2025-10-14 12:53:32 +05:30
Sagar Vora
a084f5a2f3 refactor: separate only computed CTs, with new include_computed flag 2025-10-14 12:31:47 +05:30
Sagar Vora
2c9c6c0fd5 fix: correct table_fields references 2025-10-01 12:25:00 +05:30
mergify[bot]
16058b92af
Merge branch 'develop' into 32489-role-perm-based-masking 2025-09-30 09:00:48 +00:00
Akhil Narang
6ca4d4d167
refactor(treewide): ruff format
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-09-26 13:16:43 +05:30
Ejaaz Khan
03ac6e2f75 refactor: fetch mask field from cache instead of meta 2025-09-21 19:09:32 +05:30
Ejaaz Khan
09134f44cb fix: access attribute using get method 2025-09-02 10:58:40 +05:30
Ejaaz Khan
590fe7e520
Merge branch 'develop' into 32489-role-perm-based-masking 2025-09-02 10:48:06 +05:30
Akhil Narang
16c657c2cc
fix(assign_to): adding null/NoneType descriptions was broken (#33722)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-08-21 11:35:33 +00:00
Ejaaz Khan
c2544f9096 refactor: change approach of masking fields 2025-08-18 23:38:18 +05:30
Ejaaz Khan
cbcf16440a refactor: remove masking setting from System Settings 2025-06-26 13:06:44 +05:30
mergify[bot]
0312cb7eb4
Merge branch 'develop' into 32489-role-perm-based-masking 2025-06-25 17:17:30 +00:00
Sagar Vora
d9f1fc9aee perf: use __dict__ directly 2025-06-21 20:08:02 +05:30
Sagar Vora
326c57af07 chore: remove dead meta keys 2025-06-21 20:07:10 +05:30
Ankush Menat
f56c405e26
fix: Remove meta-bundle caching (#33029)
- This has never worked
- using `modified` isn't a good way to invalidate this cache because it
  doesn't change with customization
2025-06-20 18:33:30 +05:30
Ankush Menat
3bb70a905d
fix: restrict method types in few whitelisted funcs (#32984) 2025-06-18 11:02:57 +05:30
sokumon
b79c5476a7 fix: restrict fields according to permlevel after update as well 2025-06-17 20:17:50 +05:30
Ejaaz Khan
4613129c4c fix: don't mask fields in patch, install or in migrate state 2025-06-11 20:38:29 +05:30
Ejaaz Khan
76f2221b1f fix: don't mask fields in patch, install or in migrate state 2025-06-11 20:25:13 +05:30
Ejaaz Khan
2ad1217fb0
Merge branch 'develop' into 32489-role-perm-based-masking 2025-06-11 19:47:48 +05:30
Ankush Menat
49f582ae57 perf: Use lazy doc in a lot more places 2025-06-11 09:55:45 +05:30
Ejaaz Khan
1d96a933cb
Merge branch 'develop' into 32489-role-perm-based-masking 2025-06-10 19:46:20 +05:30
Ejaaz Khan
ed0071df9e feat: export encrypted data and add system setting 2025-06-10 19:42:49 +05:30
Aayush Dalal
ca5b4cea0b
fix: throw permission error (#32860) 2025-06-10 08:47:49 +05:30
Corentin Forler
f5e99424ce
fix(load): Don't fetch Dynamic Link titles if missing doctype 2025-04-26 14:42:34 +02:00
Ejaaz Khan
002892d0bf
Merge pull request #32300 from iamejaaz/35786-module-not-found
fix: Module not found error for custom doctypes
2025-04-25 15:54:04 +05:30
Ejaaz Khan
2e0db2d69e fix: Module not found error for custom doctypes 2025-04-25 14:51:16 +05:30
Ankush Menat
b4f8549c52
perf: cast todo queries for int PK (#32295)
https://github.com/frappe/frappe/issues/32287
2025-04-25 05:49:11 +00:00
Ankush Menat
afc19dec10
perf: manually cast doc.name to string (#32292)
This avoid full table scans and undesired implicit casting at MySQL level.
2025-04-25 10:51:08 +05:30
Raffael Meyer
7c2205b703
feat: publish comment from desk (#32256) 2025-04-24 13:57:50 +02:00
sokumon
196f76028f fix: remove leaderboard and custom timeline handling 2025-04-17 00:26:57 +05:30
sokumon
a1fca6ab63 fix: remove energy points / social module 2025-04-17 00:26:57 +05:30
Akhil Narang
ad32216040
fix: support sqlite
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-04-15 13:59:16 +05:30
Raino-Harvest
33f3b54e09
refactor: handled condition in single line for status alert in submittable doctype
Removed unnecessary lines in "if-else" condition and handled in single line.
2025-03-28 12:36:10 +05:30
Raino-Harvest
aa203e3341
fix: condition based alert for Submittable DocTypes while Save and Submit 2025-03-27 20:44:32 +05:30