Problem/Motivation
When posting a comment on an issue you get notified of your update via email. Some people don't need to be notified of updates that they are making themselves.
Proposed resolution
Add a new notifications option for including your own updates, default it to TRUE, and then expose this option in the UI on the main notifications interface in the user account area.
Remaining tasks
Review the proposed implementation and patch.
User interface changes
A new checkbox will be added to the notifications section, see #6 for a screenshot of this.
API changes
There will be a new 'include_own_updates' user specific option, but this isn't really an API.
Original report by optidel
I am using this module in our intranet and it seems to be a big hit with everyone. The one peeve is that if someone subscribes to the issue tracker, they get an email for their own updates too. Not a show stopper but not very intuitive too. Sometimes the users go on an issue clearing spree and they end up updating a lot of issues in one go and they also end up getting a lot emails because of that.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | project-issue-667122-no-mail-me.patch | 13.83 KB | steven jones |
| #10 | project-issue-667122-no-mail-me.patch | 6.74 KB | steven jones |
| #7 | My account-project-not-me-1.png | 38.21 KB | steven jones |
| #5 | project-issue-667122-no-mail-me.patch | 6.76 KB | steven jones |
| #6 | My account-project-not-me.png | 38.66 KB | steven jones |
Comments
Comment #1
dwwI'm tempted to won't fix this. I often find it's useful to get my own emails on other sites where I'm using this module, for example, to forward the update to someone who's not necessarily on the site using the issue queue. In terms of the situation you describe where someone's on a spree updating issues -- if you're spamming everyone subscribed to the queue, you might as well be getting a dose of your own medicine. ;)
That said, this *could* be an option that users could control for themselves as part of the issue subscription overhaul that desperately needs to happen...
Comment #2
alberto56 commented@dww perhaps just adding the option to not email the owner would be nice.
If I go, say, to http://drupal.org/project/issues/subscribe-mail/dynamic_persistent_menu, I'm given the option of being notified of all issues, issues I follow, or none. It would make sense to add a checkbox here saying: "Don't notify of own posts/comments", so that next time I create a post or comment, I don't get notified.
Cheers,
Albert.
Comment #3
danepowell commentedI would also like to see this- it's kind of annoying to get an email for an update to an issue, post a reply, delete the email, and then a few moments later get ANOTHER email with the reply that I just posted.
Comment #4
steven jones commentedHere's a very rough, first cut of this. Completely untested, but just want to get something out there.
Comment #5
steven jones commentedHere's a slightly tweaked version that flips the checkbox around, so that you tick the box to not receive your own updates, which I think makes more sense, and copies what other systems (Redmine) do.
I've tested this on a simple project issue setup locally, and it seems to work fine!
Comment #6
steven jones commentedHere's a screenshot of what the added checkbox looks like:
Comment #7
steven jones commentedActually the patch in #5 contravenes the User interface standards so the patch in comment #4 should be reviewed and preferred.
Here's an updated screenshot:
Comment #8
chriscohen commented+1 for this. I get a lot of email anyway, and if I post on an issue, I tend to know I've posted, since I am not senile (yet), so I'd like to opt not to get an email confirming that I've done something I know I've just done!
Comment #9
attiks commentedReview of patch in #4
... want to receive ...
Comment #10
steven jones commentedManual edit of the patch that corrects the issue described in #9
Comment #11
attiks commentedIs looking good, but I have to admit I didn't try patching
Comment #12
steven jones commentedSorry, but this really does need a proper review I think.
Comment #13
attiks commentedI installed everything and created a new project + issues and the notification are only sent to myself when the checkbox is checked.
RTBC for real this time
Comment #14
steven jones commentedThanks for the review.
This still needs this question from the issue summary answering:
I don't really know enough about the D7 port to say one way or the other.
Comment #15
steven jones commentedFrom d.o office hours IRC:
so we'll port and fix in D7.
Comment #16
kingandyIf this gets ported to D7 and then backported to D6, I will laugh...
Comment #16.0
kingandyAdd issue summary
Comment #17
steven jones commentedTotally going to work on this at Drupalcon.
Comment #18
steven jones commentedHere's a cheeky little re-roll for D7.
This still needs some tests.
Comment #19
steven jones commentedActually, we should use the
->uidproperties for the actor, not use globals.Comment #20
steven jones commentedRight, actually, I can remove the 'actor' stuff from the previous patch, and I can add some tests!
Comment #21
dwwThanks! Very brief review looks good. I just downloaded the patch to my laptop and will do a more thorough review and testing ASAP.
Cheers,
-Derek
Comment #23
dwwHad a lot of time on a plane so I gave this a thorough review and local testing. It works great, thanks! And yay for including tests with your patch. :)
I committed your patch exactly as-is to commit 661e6f318. Then, I made some cleanups. Mostly pedantic nit-picky stuff that I didn't want to have you re-roll for. Committed that as commit 437444744. Notes on what I changed:
A) I renamed the DB column and internal variables to 'notify_own_updates' instead of 'include_own_updates'. Using 'include' sort of implies the setting controls what's included in the notification (e.g. another setting affecting the content of the messages) not if I should get notified at all. The UI text for the setting (which I like) uses 'notified', so we should use the same verb for the internal stuff that references it, too.
B) I didn't like how the patch overloaded
$can_accessinside_project_issue_email_notify(). Seems cleaner to usecontinue;once we realize we don't want to send the message. Frankly, I should just kill$can_accessand usecontinue;there, too. Just pushed that as commitd d3f7e7adee, in fact. ;)C) Fixed a handful of wonky code comments.
D) I wasn't thrilled with
ProjectIssueWebTestCase::createIssueComment(). It was basically cut+paste fromCommentHelperCase::postComment(), and was needlessly re-testing comment.module's settings and behaviors (generating more assertions than we need, slowing things down, etc). IMHO, project_issue shouldn't be in the business of testing if requiring comment previews is working or not. ;) It nowvariable_set()'s to set preview to optional, has a lot less assertions, doesn't mess with all the$contactstuff we don't care about, etc.Tested again (just to be sure I didn't break anything) and pushed both commits.
Now this just needs to be deployed. ;)
Thanks so much, and sorry it took so long to get this reviewed and in!
Cheers,
-Derek
Comment #24
steven jones commentedAMAZING!
Thank you so much, and completely agree with the cleanups that you've made.
I'll try to tone down my 'conversational' style comments in tests next time :)
Comment #25
drummNow deployed to Drupal.org.
Comment #26
steven jones commentedThanks very much!
(I'm looking forward to not getting this email)
Comment #27
attiks commentedThanks all, this is great