Bulk amend member digest subscriptions


(Robert McIntosh) #1

Can anyone help me with the script to run if I wanted to change the default digest subscription for any member who had not visited for (x) months from system default (3 days) to “every two weeks”?

As @pfaffman has pointed out to me already (thanks!), this is similar to the request below, but I am not familiar with this sort of coding or have regular access to the Rails console, so it would be only an occasional update routine I might run:

Or is there another way to achieve this? It strikes me that it would be very useful to cut down on email and minimise the annoyance to ‘lapsed’ members of receiving too-regular emails once they have shown not to be engaged.


(Joshua Rosenfeld) #2

This guide should work:


(Robert McIntosh) #3

Great, thanks. This is almost all I need

As I say, I don’t programme, so all the language is alien to me.

What I need to do is to change the settings ONLY for users who have not visited in, say, 6 months.

I could query this in the Data Explorer, and create a new Group for these users. Would that work?

What I don’t see is how to modify the digest frequency setting from ‘every 3 days’ to ‘every two weeks’ instead.

Putting together the information from that conversation (why could I not write 't-h-r-e-a-d? It is apparently a banned word??), would this be correct?

Am I correct that ‘beta’ is the name of the group I would need to create?

./launcher enter app
rails c
beta_group = Group.find_by_name("beta")
beta_group.users.each do |user|
UserOption.where(user_id: user.id).update_all(digest_after_days: 14)
end

(Joshua Rosenfeld) #4

I’m also not a programmer - so while it looks correct to me (with my limited knowledge of Rails), one of our engineers like @techAPJ should be able to confirm with certainty.

See Why is the word “thread” not allowed on Meta? for details. In short we want people using the correct terminology (which is topic, not thread), and also needed to improve our blocked words tool and needed a relatively commonly used word that we were OK with blocking (and whose blocking wouldn’t prevent communication from being clear).