putyourlightson / craft-campaign

Send and manage email campaigns, contacts and mailing lists in Craft CMS.
https://putyourlightson.com/plugins/campaign
Other
63 stars 25 forks source link

Resave Campaigns via CLI #481

Closed shifuma closed 5 months ago

shifuma commented 5 months ago

Feature Request

Is it possible to add a Console Command like php craft campaign/resave to resave campaigns? Use case is to merge some fields after a Craft 5 upgrade, using --set myField --to myOtherField.

Plugin Version

3.1.4

bencroker commented 5 months ago

Thanks for the suggestion! Added the following commands in https://github.com/putyourlightson/craft-campaign/commit/60180ddd5cdc76a58b43e98281ea632e7a4afa9d for the next release.

php craft resave/campaigns
php craft resave/contacts
php craft resave/mailing-lists

You can test this by running composer require "putyourlightson/craft-campaign:dev-develop as 3.2.0".

shifuma commented 5 months ago

This is great, thanks! As I was working, I realised that maybe my use case didn't need it -- as I have a Matrix Field for my Campaigns, I needed to resave the entries instead. But still useful for other fields. Thank you!

bencroker commented 5 months ago

Released in 2.16.0 and 3.2.0.