Skip to content

Commit

Permalink
Fix applying last activity to contact query
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Jan 3, 2024
1 parent d64bdeb commit 5782105
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Notes for Campaign

## 2.11.1 - Unreleased
## 2.12.0 - 2024-01-03

### Added

Expand All @@ -12,6 +12,7 @@
- Fixed a bug that could cause an error when viewing contacts in an incomplete segment ([#441](https://github.com/putyourlightson/craft-campaign/issues/441)).
- Fixed a bug in which the import job TTR setting was not being respected ([#445](https://github.com/putyourlightson/craft-campaign/issues/445)).
- Fixed a bug in which the sendout job max retry attempts setting was not being respected.
- Fixed a bug in which filtering contacts by last activity was not working ([#446](https://github.com/putyourlightson/craft-campaign/issues/446)).

## 2.11.0 - 2023-11-28

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "putyourlightson/craft-campaign",
"description": "Send and manage email campaigns, contacts and mailing lists.",
"version": "2.11.1",
"version": "2.12.0",
"type": "craft-plugin",
"homepage": "https://putyourlightson.com/plugins/campaign",
"license": "proprietary",
Expand Down
4 changes: 4 additions & 0 deletions src/elements/db/ContactElementQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ protected function beforePrepare(): bool
}
}

if ($this->lastActivity) {
$this->subQuery->andWhere(Db::parseDateParam('campaign_contacts.lastActivity', $this->lastActivity));
}

return parent::beforePrepare();
}

Expand Down

0 comments on commit 5782105

Please sign in to comment.