diff --git a/CHANGELOG.md b/CHANGELOG.md index cf8c657b..11a0a3a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Release Notes for Campaign -## 2.11.1 - Unreleased +## 2.12.0 - 2024-01-03 ### Added @@ -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 diff --git a/composer.json b/composer.json index 435657b0..bfc4cba7 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/elements/db/ContactElementQuery.php b/src/elements/db/ContactElementQuery.php index 7e903a12..44a28220 100644 --- a/src/elements/db/ContactElementQuery.php +++ b/src/elements/db/ContactElementQuery.php @@ -163,6 +163,10 @@ protected function beforePrepare(): bool } } + if ($this->lastActivity) { + $this->subQuery->andWhere(Db::parseDateParam('campaign_contacts.lastActivity', $this->lastActivity)); + } + return parent::beforePrepare(); }