Commit graph

1677 commits

Author SHA1 Message Date
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
0xD0M1M0
620488b54a
fix: if Sent blank update
Co-authored-by: Akhil Narang <me@akhilnarang.dev>
2024-12-05 08:49:16 +01:00
0xD0M1M0
49e597d219 fix: pre-commit run 2024-12-05 07:11:43 +00:00
0xD0M1M0
69670229bd fix: IMAP E-Mail Sent Folder Customization
Fixes https://github.com/frappe/frappe/issues/28630
2024-12-04 23:37:52 +01: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
s-aga-r
c3a6f750bb
refactor(FrappeMail): merge newsletter and transactional email into a single endpoint (#28480) 2024-11-16 04:57:33 +00:00
David Arnold
057139ea2e
chore(communication): cleanup unused code (#28199)
* chore: feedback doctype no longer exists

missed from https://github.com/frappe/frappe/pull/17479

* chore: remove unused communication type

This was removed and migrated already in v12:

```
frappe/patches/v12_0/setup_comments_from_communications.py:	frappe.db.delete("Communication", {"communication_type": "Comment"})
```
... comming from 41d90fa6d1
which effectively reverted 465318878e
2024-11-14 00:12:14 +01:00
Akhil Narang
e5be90beb8
chore(newsletter): make attachments public
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-11-12 12:43:38 +05:30
s-aga-r
c62e7334bc
refactor: use composite unique index in Email Account (#28417) 2024-11-11 12:19:38 +05:30
s-aga-r
e2e484e547
chore: update frappemail API endpoints (#28408) 2024-11-09 06:42:45 +00:00
Nihantra C. Patel
337a9f6e99
fix: newsletter scheduling mail (#28397)
* fix: Newsletter scheduling

* fix: Newsletter scheduling
2024-11-07 15:34:32 +05:30
Marc
7f3f2fef2b Refactor send method by extracting notification logic into a separate function
- Created `send_notification_by_channel` method to handle notification sending by channel and make it easier to extend the channels with a new channel

- Simplified `send` method by moving channel-based notification logic to the new function
2024-11-02 11:58:07 +01:00
David Arnold
91a737d8fe
chore(typing): fix some (exotic) type errors treewide (#28210) 2024-10-21 10:02:04 +00:00
Akhil Narang
76209ff9bf
Merge pull request #28128 from Sugesh393/email_notification
fix: get_doc is not usable on jinja template in notification
2024-10-18 12:33:29 +05:30
Sugesh393
cf552858bc refactor: explicit commit removed 2024-10-17 11:15:09 +05:30
Sugesh393
ea5895c7f3 refactor: email notification with jinja template 2024-10-15 18:46:34 +05:30
Sugesh393
aa35ba6888 test: email notification with jinja template 2024-10-15 17:38:16 +05:30
Sugesh393
2e4b83f848 fix: get_doc is not usable on jinja template in notification 2024-10-15 13:10:45 +05:30
David Arnold
0204db6547
chore: move to use new test record api (#28105) 2024-10-12 23:13:41 +00: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
David Arnold
83bc1f09e9
refactor: clarify test record dep management in test modules (#28060) 2024-10-09 13:44:27 +00:00
David Arnold
8cfeb156df
devx: add deprecation dumpster (#27887)
* feat: Add deprecation_dumpster.py file

* docs: add jovial and jocose docstring for frappe/deprecation_dumpster.py

* refactor: fill the dumpster with its own kind

* refactor: move to the deprecation dumpster

* chore: color coding class

* fix: only check import error when import errors
2024-10-08 18:56:10 +02:00
David Arnold
c114e5fae8
refactor: unit vs integration treewide (#27992)
* refactor: constitute unit test case

* fix: docs and type hints

* refactor: mark presumed integration test cases explicitly

At time of writing, we now have at least two base test classes:

- frappe.tests.UnitTestCase
- frappe.tests.IntegrationTestCase

They load in their perspective priority queue during execution.

Probably more to come for more efficient queing and scheduling.

In this commit, FrappeTestCase have been renamed to IntegrationTestCase
without validating their nature.

* feat: Move test-related functions from test_runner.py to tests/utils.py

* refactor: add bare UnitTestCase to all doctype tests

This should teach LLMs in their next pass that the distinction matters
and that this is widely used framework practice
2024-10-06 09:43:36 +00:00
Rushabh Mehta
23f52c1720 fix(style): update error, not found pages 2024-09-25 15:46:24 +05:30
Corentin Flr
6b7c0007fe
test(File): Add test for attachments with percent-encoded file names 2024-09-16 13:47:27 +02:00
Corentin Flr
71f111e267
fix(InboundEmail): Unquote percent-encoded file names 2024-09-16 13:47:27 +02:00
David Arnold
e606c23823
Merge pull request #27697 from blaggacao/feat/notification-with-minutes-offset
feat/notification with minutes offset
2024-09-12 07:12:01 +02:00
Akhil Narang
2e28dc8735
chore: reword description
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-09-12 10:28:54 +05:30
David
924ddd07bd
fix: semgrep complaints 2024-09-12 02:13:46 +02:00
David
2a6161eea6
test: comment out due to uncontrollable side effects 2024-09-12 01:11:18 +02:00
David
43c5cbd8a6
feat(analytics): add basic utm nomenclature for analytics 2024-09-12 00:08:05 +02:00
David
dd8cd9860c
test: add more notification offset tests for edge cases 2024-09-10 20:11:59 +02:00
David (aider)
a8c53c8940
feat: Implement minutes_offset feature and add test cases 2024-09-10 16:45:53 +02:00
David
ac379f297c
fix: Add support for minutes-based notifications 2024-09-10 16:45:53 +02:00
David
6aa27c7d7a
fix: notification condition has no custom context (perf) 2024-09-10 16:37:19 +02:00
Corentin Forler
20b1f4b327
fix(email): Fix unbound variable in make_error_msg
UnboundLocalError: local variable 'partial_mail' referenced before assignment
2024-09-05 13:51:58 +02:00
Akhil Narang
5a0d2a94c9
Merge pull request #27629 from cogk/fix-parse-worse-email-headers
fix(email): Try to parse bad email address headers
2024-09-04 17:18:28 +05:30
David
69ae0724ff
fix(notification): add ability to enqueue-call from server scripts 2024-09-03 20:46:17 +02:00
Balamurali M
cea1713575 fix(EmailQueue): Log more error onto email queue
Require it log actual exception raised by Email Delivery Service on plan
limit reached
2024-09-03 16:36:03 +05:30
Corentin Forler
2ba199349c
fix(email): Try to parse bad email address headers 2024-09-03 10:40:29 +02:00
Akhil Narang
cdfbbde3d5
Merge pull request #23691 from phot0n/fix-email-bulk-retry
refactor(minor): email retry
2024-08-28 16:54:48 +05:30
Akhil Narang
273545dcae
Merge pull request #27474 from akhilnarang/notify-email-queue-suspended
chore(email_queue): nudge user to resume email queue if suspended and they are manually sending
2024-08-22 12:12:15 +05:30
phot0n
082549e273 refactor: use the same method for retrying one as well as multiple email
queues

* removed retry_sending method from email queue controller
2024-08-22 05:56:00 +00:00
phot0n
c875fbe20a refactor: email bulk retry
* move msgprint to frontend so that it cna be displayed before the api call is completed
* use set_value instead of save() doc method so that other doc values can't be altered
2024-08-22 05:55:59 +00:00
Akhil Narang
b4c53392d7
fix(notification): can't use message where it isn't defined
Sentry FRAPPE-7VT

Partial revert of 8a7707e3fa

```
UnboundLocalError: cannot access local variable 'message' where it is not associated with a value
  File "frappe/app.py", line 114, in application
    response = frappe.api.handle(request)
  File "frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "__init__.py", line 1768, in call
    return fn(*args, **newargs)
  File "frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "frappe/desk/form/save.py", line 37, in savedocs
    doc.submit()
  File "frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "frappe/model/document.py", line 1048, in submit
    return self._submit()
  File "frappe/model/document.py", line 1031, in _submit
    return self.save()
  File "frappe/model/document.py", line 337, in save
    return self._save(*args, **kwargs)
  File "frappe/model/document.py", line 390, in _save
    self.run_post_save_methods()
  File "frappe/model/document.py", line 1131, in run_post_save_methods
    self.run_method("on_submit")
  File "frappe/model/document.py", line 964, in run_method
    self.run_notifications(method)
  File "frappe/model/document.py", line 1024, in run_notifications
    _evaluate_alert(alert)
  File "frappe/model/document.py", line 1007, in _evaluate_alert
    evaluate_alert(self, alert.name, alert.event)
  File "frappe/email/doctype/notification/notification.py", line 517, in evaluate_alert
    msg = f"<details><summary>{title}</summary>{message}</details>"
```

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-22 10:43:36 +05:30
Akhil Narang
7ab02055d6
chore(email_queue): nudge user to resume email queue if suspended and they are manually sending
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-21 16:21:52 +05:30
Suraj Shetty
5f9fdf2c0e
Merge branch 'develop' into f1007 2024-08-12 14:39:33 +05:30
Akhil Narang
fc12e46171
Merge pull request #27188 from blaggacao/chore/adapt-webhook-preview
chore: adapt webhook preview
2024-08-12 13:34:03 +05:30
David
ac0e46669d
fix: spec preview fields statically on the frontend 2024-08-09 13:50:41 +02:00