Forum OpenACS Development: Adding email alerts to general comments

I'm trying to decide which of the following paths to pursue:

a) allow general-comments to accept an optional list of email addresses. When provided, the general-comments page will display an toggle switch on the general comments page, which allows someone to optionally send email to everyone. It wouldn't give out the email addresses, just give them the option to send an email alert.

b) copy the general-comments code to project manager, and do something similar to (a), but don't do it universally.

Thoughts?

Biggest disadvantages I can think of:

x) general comments becomes dependend on acs-mail-lite
y) adding in the email addresses to send email to as a list is kludge-like. And perhaps not even scalable. I'm not sure what would happen if the list were a mile long for example.

However, every time I've brought this up in the past, nobody has suggested anything that seemed like a better solution.

I'd like any future general-comments package to provide this sort of support, so I'm hoping that we can come up with an easy to implement solution.

Collapse
Posted by Jade Rubick on
Looking at it more closely, it looks like this wouldn't just be changing one proc, but a couple of pages within general-comments. I'm going to proceed unless I hear any protest.. All of this is optional, of course. Otherwise, I would TIP the changes. As I understand it, changes that are optional like this do not require a TIP...
Collapse
Posted by Jade Rubick on
It looks like people have had difficulty with adding email notifications to general-comments is for architectural reasons.

General comments are usually created using the general_comments_create_link proc, which makes a URL for the person to click on. The biggest problem with the approach I've outlined so far is that if I pass in the email addresses, they have to go into the URL, which leaks the email addresses. That's fine for the application I'm working on, but I think others might consider that to be a bug.

So maybe the best option is for project manager to have it's own comment creation page. After the comment is created, then it will send out an email. It's easy to do this within project-manager -- I was just hoping to solve a general problem instead of just a specific one.

If anyone else has a better idea, I'll implement it this right now. But otherwise, I'm going to just stick this code in project-manager.

Collapse
Posted by Don Baccus on
Well, while we don't necessarily want to TIP all optional changes we do want some control over what goes into our standard packages.

In this case it seems that you should be investigating ways to integrate notifications into general comments.  Notifications gives the user a single place to control the alerts they get from an OpenACS site.  There is also support for SMS alerts floating around (not sure that will go into our standard code because there's not one standard way to do it as there is with e-mail), and probably there will be support for other types of alerts added by folks in the future.

The notifications paradigm is that the user controls what they get, rather than (say) the author of a comment.  Though of course there's nothing that stops a package from allowing its admins to add notifications for a user or to even add notifications silently (the homework package sets up automatic notifications to tell a student when a professor's comments have been uploaded, for instance).

Collapse
Posted by Jade Rubick on
Thanks for your feedback Don. What you've described makes sense to me. I'll look into adding notifications to general-comments.
Collapse
Posted by Joel Aufrecht on
Jade, can you describe exactly what behavior you are trying to produce?  I didn't fully grok your initial post.  How about a full use case or two?  In particular, is this for users, or visitors?