Commit graph

938 commits

Author SHA1 Message Date
Ayush Chaudhari
761751f269
feat: App-Defined Workflow Tasks and Server Scripts on Transition (#33255)
* feat: add workflow task doctypes

* chore: add Workflow Task to Script Type of Server Scripts

* chore: add description for Workflow Tasks

* feat: fetch dotted paths and corresponding names from hooks

* fix: use Select field instead of Autocomplete

* feat: execute tasks in the background on state transition

* fix: throw error when task not found

* fix: naming for transition task set by user

* fix: child table views

* feat: support for server scripts

* chore: comments and description

* fix: change the casing of docevent options

* fix: change test casing

* feat: Add Workflow Transition field to webhooks

* fix: temporarily remove filter

* feat: add webhooks as workflow actions

* test: test execution of synchronous app-defined methods and server scripts

* chore: shorten the description and change the fieldname of the field 'execute_asynchronously' to 'asynchronous'

* test: server script executipn

* fix: add field to UI

* test: change customer to domain

* test: change Customer to Domain

* fix: patch for change in webhook fields

* chore: fetch only used fields in get_all

* fix: don't run test logic in application code 🙂

* test: separate tests for workflow tasks

* Revert "fix: patch for change in webhook fields"

This reverts commit 2e9c51c43ca2b3698991fbe75cc4032368ab174c.

* chore: break into smaller functions

* test: webhooks with workflow tasks

isolate mock responses to test_sync_tasks

* Revert "fix: change test casing"

This reverts commit e2bad96ed01dea0a26d002ea44a1e0175525ed31.

* Revert "fix: change the casing of docevent options"

This reverts commit ddfc81bf775fad74225f25815b8e3e7b255dc9eb.

* fix: webhook casing

* fix: type hint for doc
2025-07-29 11:01:44 +05:30
Soham Kulkarni
64db88228f
refactor: seperate blogs into a seperate app (#32737)
* fix: remove doctypes,workspace blocks, files

* fix: minor python tests and UI tests

* fix: remove blog post from tests

* fix: remove blogger as role for tests

* fix: add check for if doctype exists

* fix: ui test

* fix: more cleanup

* fix: cleanup comments and fix test_query

* fix: resolve conflicts

* fix: add warning and handle comments
2025-07-28 14:35:02 +05:30
18alantom
c4f2335f11
fix: support public client 2025-07-04 15:05:50 +05:30
18alantom
db4a7504e5
fix: add hooks to handle cors 2025-07-04 13:18:43 +05:30
18alantom
e76c1830e1
chore: add global flag for Social Login Key 2025-07-04 11:25:06 +05:30
18alantom
befca37299
chore: README for integrations with OAuth2 docs
- Update descriptionsi in OAuth Settings
2025-07-03 14:42:28 +05:30
18alantom
5ca8ad9d84
refactor: deprecate OAuth Provider Settings
OAuth Settings has its fields now (only one)
2025-07-03 14:07:38 +05:30
18alantom
1215afdf96
feat(OAuth2): support RFC 9728
adds OAuth Settings to configure settings pertaining to Frappe used as
an OAuth auth server and resource server
2025-07-03 13:20:52 +05:30
18alantom
3a47801598
feat(OAuth2): support RFC 7591
This allows a client to be registered without manual intervention.
2025-07-02 13:01:37 +05:30
Soham Kulkarni
77eda41443
Merge pull request #32351 from sokumon/offsite-backups-removal
refactor: separating backup integrations into an app
2025-06-17 23:30:51 +05:30
Sagar Vora
b3e1eda4c8
feat: global frappe.in_test flag (#32960)
* feat: global `frappe.in_test` flag

* feat: helper utility to toggle `frappe.in_test`

* fix: use `toggle_test_mode` util

* fix: use `frappe.in_test`

* chore: add comment explaining global `in_test`

* chore: ignore commit replacing flag usage

* test: temporarily disable `frappe.in_test`

this worked earlier because flag was set in werkzeug.local which was separate for API test client

* test: add comment explaining change
2025-06-17 19:19:31 +05:30
sokumon
422995cd45 fix: seperate backup options into app 2025-06-14 23:59:22 +05:30
Karuppasamy
22d16ba1ca
fix: update Keycloak redirect_url to correct login method endpoint (#32908) 2025-06-12 13:38:42 +05:30
Ankush Menat
8088bd3891
chore: Drop empty UnitTestCases (#32867)
Next to zero adoption after introduction, just noise in codebase.

I don't see any point in arguing about purity of test cases when
existence and quality of test cases is usually the bigger problem.

Dropped using semgrep
2025-06-10 05:28:53 +00:00
Ankush Menat
2dfb96f91c
fix: handle snapshot isolation errors better (#32318)
* fix: Avoid Snapshot violation

- Main thread created and "read" user
- Other thread modified something
- Main thread wants to delete or "write" to same row.

This violates snapshot isolation.

* fix: treat snapshot violation as deadlock for now

* test: handle snapshot violations
2025-04-28 06:18:38 +00:00
Ankush Menat
33e28e0b28
Merge pull request #31989 from revant/clear-expired-tokens
fix: add clear_old_logs OAuth Bearer Token
2025-04-17 18:25:38 +05:30
Ankush Menat
acea1aedbf perf: handle clearing large oauth token table 2025-04-17 18:05:37 +05:30
Gavin D'souza
f2e5c2ab26
chore: Remove redundant casting
(cherry picked from commit 3cd431df800cc448268200823bee59820407f096)
2025-04-14 17:55:30 +02:00
Gavin D'souza
97942dba3c
refactor(Event): get_events
* Don't show repeatable events starting in the future for the past dates
  [fix]
* Simplify logic & variables naming for better maintainability, reduce
  unnecessary looping, data structures [perf]
* Use standard library when possible [refactor]

(cherry picked from commit 4570758b5fd02e724b8b044abdd1a3817bcef35b)
2025-04-14 17:55:29 +02:00
Gavin D'souza
3894d4093a
fix(google-calendar): Use byday variable type properly
Introduced via https://github.com/frappe/frappe/pull/31772

(cherry picked from commit 3829c2a1c2cedf55c036254c57b211959619468b)
2025-04-14 17:55:22 +02:00
Revant Nandgaonkar
14d475f2c2 chore: fix pre-commit errors 2025-04-03 11:53:32 +05:30
Revant Nandgaonkar
7854622495 fix: add clear_old_logs OAuth Bearer Token 2025-04-03 11:45:44 +05:30
Ejaaz Khan
bf58d507fa
Merge pull request #31735 from aldo-o/s3-cutom-backup-path
feat: Configure custom path when backing up to S3
2025-03-31 12:39:25 +05:30
Gavin D'souza
a73ecf5456
feat(Event): Sync Participants if they are in-system users 2025-03-17 20:09:45 +01:00
Gavin D'souza
6ead12eb1a
fix(Google Calendar): lazy translate common label properly 2025-03-17 19:29:36 +01:00
Gavin D'souza
addf682acb
fix: Sync events based on calendar user not who created it 2025-03-17 19:29:02 +01:00
Gavin D'souza
fe59e3914b
fix: Events on Google Calendar dont have mandatory titles like Frappe 2025-03-17 19:28:08 +01:00
Gavin D'souza
08657d58a3
fix: Sync all calendars and not only the first one!
I don't get how this worked for others until now
2025-03-17 19:25:53 +01:00
Gavin D'souza
ead0cb5870
refactor: Google Calendar
* Simplify logical flows based on flow of data & transactions
 * Reduce indents
 * Remove redundant blocks
 * Make code less brittle in redirect_uri generation
 * Add typing wherever valuable
2025-03-17 19:22:54 +01:00
Gavin D'souza
e9691a1b08
perf: Google Calendar
* Check if sync is enabled before refreshing token & shit - reduce
   deletion of event times like a 1000x
 * Use cached settings to avoid reading the same thing while operating
   on Events or Google Calendar syncs
2025-03-17 19:11:06 +01:00
Gavin D'souza
67ed91021b
fix(Google Calendar): Parse recurrence params correctly
Closes https://github.com/frappe/frappe/issues/15718
2025-03-17 18:54:28 +01:00
Aldo
08639c3b60 feat: Configure custom path when backing up to S3 2025-03-15 17:19:30 -04:00
Aldo
4d53cc531a feat: [31732] Configure custom path when backing up to S3 2025-03-15 04:16:20 -04:00
Aldo
f9866b59be feat: [31732] Configure custom path when backing up to S3 2025-03-15 04:14:34 -04:00
Aldo
0a5fa1e94c feat: [31732] Configure custom path when backing up to S3 2025-03-15 03:57:57 -04:00
Ejaaz Khan
85c22ec156
Merge pull request #30923 from bartoszpijet/develop
fix: event sync from Google Calendar not visible to user
2025-02-28 11:39:35 +05:30
Ankush Menat
c229f5a34a
fix: handle large URL on webhook logs (#31428)
Missed in https://github.com/frappe/frappe/pull/24761
2025-02-25 09:57:29 +00:00
Bartosz Pijet
4213ce69b1 refactor: Improve google_calendar insert_event_to_calendar readability 2025-02-24 11:08:19 +01:00
Bartosz Pijet
0130fb83d0 fix: Google calendar sync
Bugfix for events beeing synced as "Administrator" while beeing private. Now admin can select if events should be synced as public. Also This fix will sync events with their proper owners.
2025-02-21 17:53:33 +01:00
Alex Leach
cfbbaffd1d feat: OAuth 2.0. Allow including client_id in backend app auth request.
As per rfc6749 section-3.2.1, clients:

> MAY use the "client_id" request parameter to identify itself when
> sending requests to the token endpoint.

This patch allows to include client_id in BackendAppFlow, for servers
that require it.
2025-02-20 06:14:11 +00:00
Ankush Menat
0397b32771
perf: client-cache webhooks (#31095) 2025-02-04 06:17:35 +00:00
Ankush Menat
4116a33560
perf: speed up oauth bearer token query (#29184)
* perf: index user and make not_nullable

* refactor: simpler expiry setting

* perf: don't fetch all tokens
2025-01-15 13:24:46 +00:00
Ankush Menat
e137e36180 test: don't sleep in webhook tests
Wasting 2 minutes doing nothing.
2025-01-04 12:07:04 +05:30
Ankush Menat
60bc472ab6
revert: restore JSON files (#28717)
* Revert: bring back JSON files

* chore: re-apply changes to new files

* chore: remove old TOML files

* chore: delete empty files
2024-12-09 08:41:56 +00:00
Gavin D'souza
d521ac124d
style: Sort imports & move whitespaces to please ruff 2024-12-06 15:43:33 +05:30
Gavin D'souza
7e2e5f80b9
fix: Usage of tzinfo replace when no tz is specified 2024-12-06 15:43:33 +05:30
Gavin D'souza
c6580b5880
refactor: Replace pytz to std lib zoneinfo & datetime
Signed-off-by: Gavin D'souza <gavin.dsouza@switchup.de>
2024-12-06 15:43:33 +05:30
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
Raffael Meyer
881d8c8597
fix(Webhook): highlighting for JSON Request Body (#28313)
The JSON request body is  supposed to hold a jinja template which produces valid JSON. The JSON highlightng shows errors when applied to a jinja template.
2024-10-28 23:02:16 +01:00
David Arnold
443c38daa9
refactor: toml test records for readability (#28065)
* refactor: toml test records for readability

* fix: maintain backwards compatibility

* refactor: transform in-tree records

* chore: don't use deprecated functions (treewide)

* chore: revert migration of tests which depend on old test records list

* feat: add cls.globalTestRecords on IntegrationTestCase
2024-10-10 13:24:02 +02:00