Commit Graph

37 Commits

Author SHA1 Message Date
172ffb7b61 Increase number of checks if the email was sent in automation
[MAILPOET-6175]
2024-08-12 16:11:19 +02:00
e5ab65f28e Fix send action checkSendingStatus to support multiple emails per subscriber.
It is possible that one email (e.g., purchase in category) is sent multiple times
to the same subscriber.

AutomationEmailScheduler::getScheduledTaskSubscriber was selecting the task based on subscriber and newsletter.
In the case of multiple emails sent to one subscriber, the method failed to pick ScheduledTaskSubsrciberEntity because
the query was fetching multiple results, but getOneOrNullResult expects only one result.

This commit fixes it by adding additional filtering by $runId to get the ScheduledTaskSubsriberEntity associated
with the correct run.

I did the filtering in PHP because an alternative would be using LIKE %% in the query. The meta column is text.
[MAILPOET-6155]
2024-08-07 16:01:48 +02:00
345571c6f9 Fix missing dummy IDs in tests
[MAILPOET-4977]
2024-05-06 12:39:00 +02:00
a1bafad6f1 Add tests for email sent handler
[MAILPOET-4977]
2024-05-06 12:39:00 +02:00
36089cc2f4 Save automation run info to scheduled task meta field
[MAILPOET-4977]
2024-05-06 12:39:00 +02:00
123b0d65e2 Do not complete send email action run immediately, schedule a check instead
[MAILPOET-4977]
2024-05-06 12:39:00 +02:00
0d6fe6e5eb Apply rules to tests and tasks 2024-03-21 16:57:59 +01:00
8b40553d0b Do not check subscriber against segment when sending transactional email
[MAILPOET-5720]
2024-02-14 14:36:22 +01:00
41a55262fe Fix PHPStan warnings in tests
[MAILPOET-5751]
2023-12-13 11:48:14 +01:00
9b56fdc688 Replace expect()->count() with verify()->arrayCount()
codeception/verify 2.1 removed support for expect()->count() so we need
to replace it with verify()->arrayCount().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
6ef3435a80 Remove segment as a required subject
If a segment is given, the subscriber needs to be subscribed to it, otherwise
the subscriber only needs to be globally subscribed

[MAILPOET-5514]
2023-10-03 19:14:30 +02:00
9d94c1c5f2 Fix method naming and argument type
[MAILPOET-5568]
2023-09-20 02:36:40 -07:00
eeb4d64e8b Pass step run controller to automation actions
[MAILPOET-5569]
2023-09-20 02:36:40 -07:00
5f088d2c35 Add step run number to step run args
[MAILPOET-5569]
2023-09-20 02:36:40 -07:00
402cb23b90 Test the transactional type is set correctly
[MAILPOET-4999]
2023-05-15 08:19:19 +02:00
69f21814e3 Rename "transactional" email type to "automation_transactional"
[MAILPOET-5258]
2023-04-24 09:54:08 +03:00
b3e836548c Create newsletter in test
[MAILPOET-4934]
2023-04-17 13:59:39 +02:00
db3bbd83aa Test the transactional type is set correctly
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
c75bc388c9 Remove unnecessary cleanup code
MAILPOET-5145
2023-04-07 12:11:12 -05:00
93cfffe295 Allow sending an email multiple times
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
c67c58709b Unify spacing of declare statements
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
7db40b27b5 Fix errors automatically with phpcbf
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
9d55d3f134 Use "automation" instead of "workflow"
[MAILPOET-4793]
2022-11-14 12:14:35 +02:00
5201c359d3 Adjust SendEmailActionTest to new error format
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
7425c73d9e Add error messages to action validation, use step validation args
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
02aaba1ded Pass full step map to automation workflow so it can be validated
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
fe3d719a13 Use step run args in existing actions
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
1677cc2842 Save and load workflows in the new format, update API
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
e32b06a5a8 Add data cleanup after SendEmailActionTest tests
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
99d4dfb558 Fix integration test to run without WooCommerce related test
SendEmailActionTest test was dependent on a cleanup
from a previous test, which was moved to the woo group.
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
34d94edd3e Add author to Workflow
[MAILPOET-4417]
2022-08-24 14:02:08 +02:00
24849afb7a Make name a property of Step.args instead of Step
[MAILPOET-4445]
2022-08-17 16:01:45 +02:00
33fb02e2ce Add missing spaces and remove double spaces around "null,"
[MAILPOET-4445]
2022-08-17 16:01:45 +02:00
d4bc448ac6 Add name property to Step
[MAILPOET-4445]
2022-08-17 16:01:45 +02:00
02489a61a6 Add version_id to WorkflowRun
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
4aa323b612 Extract data-carrying classes to dedicated namespace
We need a separation of "Step" as an interface vs. "Step" as a serializable data structure.

[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
d447702941 Convert welcome email action to a generic send email action
[MAILPOET-4465]
2022-07-12 13:36:58 +02:00