There are two scenarios that come up frequently where I think it would be helpful to automatically subscribe a user to issue e-mails for a brand new project that they create:
- I have heard frequently (probably a dozen times in the past year) "Oh, I didn't see that issue. I assumed it would subscribe me to e-mails automatically".
- People get some issue in their queue that is important - security, inappropriate use of d.o resources, inappropriate forking - and they never see that issue. Then later action is taken with the justification "an issue sat in the queue for a really long time, it's OK to move quickly on this"
In both of those cases people would be better off getting e-mails about their project so that they know what's going on. Further, our project would be improved in general because we would have better communication.
It's easy to opt-out from the mails, but somewhat hard to find them if you are "just trying to figure out how to make the crazy release system work."
I post this here for comments. I assume code will need to go into the project_issues.module or drupalorg.module and I'm happy to work on it once we have consensus for whether to do this and where.
| Comment | File | Size | Author |
|---|---|---|---|
| #33 | 872774_project_issue_notifications_on_projects.patch | 579 bytes | greggles |
| #26 | 872774-12.project-owner-default-issue-notification-D7.patch | 678 bytes | greggles |
| #14 | project_issue.default-notification.14.patch | 4.35 KB | sun |
| #12 | 872774-12.project-owner-default-issue-notification.patch | 823 bytes | dww |
| #6 | project_issue-872774-5.patch | 848 bytes | tim.plunkett |
Comments
Comment #1
stephthegeek commented+1. I totally do this with every project, forget that I have to manually subscribe until something else triggers a "hey, I didn't see that email..." lightbulb.
Also would be great for those who use Project elsewhere for managing projects/issues.
Comment #2
allie micka+1 See also http://drupal.org/node/332735 - A destructive Maintainership decision was made in this issue based on "non-responsiveness." Frankly, it took years for me to realize that I wasn't automatically being subscribed to my own projects.
I would *much* rather unsubscribe myself from bothersome projects than be affected by "procedural decisions" that I can be accidentally excluded from.
Comment #3
realityloop commentedAnother +1, collapsed sections don't stand out enough, I've been wondering why I couldn't get emailled on issue posts for ages.. and greggles just pointed it out, hiding in plain sight!
Comment #4
tim.plunkettMajor +1
Comment #5
dwwI think this belongs directly in project_issue. In fact, this could be another knob at user/N/notifications once #15380: Allow to configure content of issue notification e-mails is finally tested and deployed. I'm fine with it defaulting to sending you emails on your new projects, but it'd be nice to let people configure the behavior they want automatically on new projects they create. But, as step 0, new projects can start you off subscribed to all issues and you have to opt out (or downgrade to "own issues") for each one. So, the first patch in here could have no UI at all, and we could start from there, then circle back and add a knob about the default whenever #15380 is done.
Since issue subscription code is so ancient and unloved, there's no sane API for manipulating a user's issue subscriptions. So, at this point, you just want to see via hook_nodeapi() when a project node is created, and manually insert a row into {project_subscriptions}. There's already a function specifically for project_issue_nodeapi() when a new project is inserted: project_issue_project_insert(). So, we just need a 2 line patch to that function, a db_query() and a comment. ;)
Patches welcome!
Thanks,
-Derek
Comment #6
tim.plunkettShould the comment be expanded with a @TODO about a future UI?
And should their be a note about the magic number 2?
(Taken from
$levels = array(0 => t('None'), 1 => t('Own issues'), 2 => t('All issues'));, in project_issue_subscribe_submit().)Comment #7
tim.plunkettI got bit by this again, so bump.
Comment #8
gregglesA note about the magic number 2 would be great.
I'm not sure if this makes sense to change for all sites or we need an option. My personal preference is to make it work like this for all sites since the option would clutter the UI for something that is a sensible default.
@dww or another project maintainer, can you weigh in on this idea? It's a small patch if nothing else ;)
Comment #9
dwwI'm definitely in favor of this. However, I think it'd be better to wait until #397458: Revamp mailing logic to leverage flag module is done and deployed for two reasons:
A) In the scheme of things, that patch is fixing a vastly more important UX bug, so I don't want to create any additional delays for that, force a re-roll, etc.
B) That patch is introducing a user/N/subscriptions page (and DB table) for settings exactly like this. So, once that lands, that'd be the perfect place to make this behavior configurable.
Sadly, I'm just about to leave for ~3.5 weeks offline (with only a day in between to check in on emergencies) so I'm not in a position to drive #397458 home and deploy it right now. However, interested parties should definitely join the party over there, provide reviews, testing, simpletests, feedback, etc.
Thanks!
-Derek
Comment #10
tim.plunkettNoted, assigning so I don't lose track once the other patch is in.
Comment #11
dwwp.s. I forgot to mention, but #397458: Revamp mailing logic to leverage flag module also introduces constants for the magic subscription level integers, so that'll be another nice thing for re-rolling this one. ;)
Thanks Tim!
Cheers,
-Derek
Comment #12
dwwRe-rolled for the 34496-flag-integration feature branch. I've already merged #397458: Revamp mailing logic to leverage flag module into this branch, so we can use the new APIs and constants for this stuff. Tested and working fine.
I'm still pondering if we should add a per-user preference to control this behavior. However, I think that should probably wait until #15380: Allow to configure content of issue notification e-mails is re-rolled and merged into the branch, since that's probably going to conflict.
So, we could always just commit this now as-is, and open a follow-up issue about expanding it with a preference.
Comment #13
dave reid+1 for this functionality. Often I hear maintainers complain that they had no idea people were filing issues in their modules because they weren't even subscribed. I would be very worried about making this with no opt-out capability though. What happens when a module changes owners? Or project is marked with an abandoned status?
Comment #14
sunI'd suggest to couple this automation to the user's global default preference for getting e-mail notifications.
If it's "none", then we know that the user does not want to get any e-mail notifications at all (even for newly created projects).
Prerequisite: Having a preference configured in the first place.
Attached patch adds the condition, and outputs a message for all users that haven't configured their preference yet.
Comment #15
attiks commentedI posted an idea on ideascale that expands this a bit: Our problem is that we need an easy way to follow our own issues, issues from colleagues and keep an eye on the issue queue from projects/sandboxes we co-maintain, so it would be nice that we can auto follow all new issues based on projects/sandboxes we select.
Comment #16
dwwattiks: You can already get email notification for all issues from individual projects you care about at the Notifications tab on your user profile page. This issue here is just talking about email notification so that by default you get emails for all issues from projects you create, even issues you're *not* following.
You're either talking about automatically following all issues from specific projects and/or a way to see all issues for a set of projects, not just the ones you own. In that case, you want to see:
#101341-36: 'My projects' should also display projects that are being co-maintained
#1434450: Add the ability to follow projects like we follow issues
Cheers,
-Derek
Comment #17
attiks commentedDerek, you read my mind, thanks for the issue links
Comment #18
tim.plunketthttp://drupal.org/user/%user/project-issue has a "Default notification" setting, but that is EVERY PROJECT.
What this needs to do is add projects to the individual customizations section when creating them. If we still want to do it.
Comment #19
tim.plunkettAlso opened #1530038: Allow users to automatically follow all issues created in a project, which is different enough from this (not related to email) that I made it separate.
Comment #20
klonos...sorry to ask this off-topic (though referring to a related issue), but can anybody point to the issue for when a user does not automatically follow issues they file? We do have an issue for that. Right? I searched among the issues I follow and could not locate it any more - might have accidentally un-followed it.
Comment #21
dww@klonos: No idea what you're talking about. You mean that's a feature request to add the ability not to follow your own issues? Or are you claiming there's a bug that users don't automatically follow their own issues?
Thanks,
-Derek
Comment #22
klonos...this is not the same as the issue I'm having, but searching for a fitting one did not yell any results. Sometimes, when I file a new issue in d.o, I'm not automatically subscribed to that issue and I need to manually press the "follow" button.
Comment #23
klonos...it just happened again. Am I the only one seeing this behavior?
Comment #24
greggles@klonos - you're off-topic and complaining that nobody is responding to you. That's unlikely to lead to something productive.
I disagree with the logic of #14. The nag feels like an overly prominent nag of something that isn't relevant to many people. Overloading the "None" setting to mean "also not for new projects" is a guess at what people want. It may be what some people want but it's not universal by any means. If people start complaining that they are getting too many mails we can revisit this and add a UI for this item.
The patch in #12 still applies and looks great to me.
I know that the focus is on D7 port, but #12 seems like something worth committing. If there are a few small things, maybe we can deploy the latest D6 project branch to d.o to get these enhancements for the next few months before d7 happens.
Marking RTBC as a last chance for feedback.
Comment #25
gregglesI just checked and the only other thing that's committed to 6.x-1.x and not yet deployed is #1864988: Add issue number to window title which is also tiny and also would be lovely to deploy.
Comment #26
gregglesGreat, committed http://drupalcode.org/project/project_issue.git/commit/3fe24d7
7.x-2.x port attached, but I think notifications are not functional in D7 right now, so maybe this should wait for that to be fixed before being committed?
Comment #27
drummIt is okay to go ahead and commit this to 7.x-2.x. On visual inspection, the API looks the same and I'd expect this code won't throw any new errors. A thorough round of work on #1560012: Port per-user issue notification email functionality to D7 will fix up any problems from this new code.
Comment #28
gregglesGreat - thanks for the visual review, drumm - http://drupalcode.org/project/project_issue.git/commit/1bf6f58
Now deployed, as well!
Comment #29
alexandrezia commentedThe patch you guys just committed into Git is actually subscribing people to issues, not projects.
I think we should change the following line:
project_issue_notification_project_setting_save($node->uid, $node->nid, PROJECT_ISSUE_NOTIFICATION_ALL);
to:
project_issue_notification_project_setting_save($node->uid, $node->field_project[LANGUAGE_NONE][0]['target_id'], PROJECT_ISSUE_NOTIFICATION_ALL);
Comment #30
gregglesThat makes sense alexandrezia - you mean just for d7, right? Do you agree the d6 patch is good?
Comment #31
alexandrezia commentedYes, I'm using Drupal 7, did not test on Drupal 6, sorry.
Comment #32
dwwSorry, I didn't look at the D7 patch here at all. I agree that #26 is a bug. However, the proposed solution in #29 is also wrong. Instead of using
hook_node_insert()to find new issue nodes and then try to (re)subscribe the author of that issue to all issues for the corresponding project, we need to be checking for new project nodes, and automatically subscribe the owner of the project node. So, the bug isn't$node->nidvs.$node->field_project[LANGUAGE_NONE][0]['target_id']. The real bug is this:Instead, we want this:
That would match what's going on in the D6 version. See what I mean?
Cheers,
-Derek
Comment #33
gregglesYes, that's what I was thinking.
Comment #34
dwwNot tested, but yeah, that looks right. ;)
Thanks!
-Derek
Comment #35
alexandrezia commentedTested in Drupal 7, works fine. Thanks guys.
Comment #36
gregglesGreat, thanks! http://drupalcode.org/project/project_issue.git/commit/b6cab3c