if you use a project node's edit tab and fill in something for the "Issues e-mail address" setting, which claims "If you wish to receive a copy of all the issues to a central location specify an address here", you get no emails. however, subscribing to an issue queue via project/issues/subscribe works fine.

i think the best solution to this bug is to just remove the "Issues e-mail address:" stuff completely and have everyone use the subscribe method, instead. this has the 1 downside of forcing the issue emails to go to the email account of a valid user on the site, as opposed to being able to send them (directly) to an arbitrary address. i don't know if anyone cares about this specific functionality that would mind just using either a) their existing account's email or b) creating a new user with the email they wanted for their project's issues and having that user subscribe, instead.

i'd rather just rip out the code for this alternate (currently broken) method of getting emails, than trying to debug it and fix it. the tiny advantage (level of indirection of emails w/o another site account) is dwarfed by a) making project's codebase smaller, b) less knobs/options for people trying to use it, c) removing duplicate effort for the same basic functionality.

comments?

thank,
-derek

Comments

dww’s picture

ahah! in the process of working on http://drupal.org/node/74995 and testing it thoroughly, i figured out the problem here... ;)

on the full project edit form, you see:

Categories:
Which issue categories to e-mail. If none is checked all categories will be posted.
...
States:
Which issue states to e-mail. If none is checked all states will be posted.

however, that's not really how the code works. currently, if you don't select anything, it defaults to not sending anything, unlike what the descriptions say.

furthermore, only if you have 'administer projects' permission (not just 'maintain projects') do you even see the fields for 'Categories' and 'States', which seems a little weird.

trivial solution:
- change it so you only need 'maintain projects' permission to specify these 2 fields (sets of checkboxes, really)
- fix the description to make it clear you have to select the kinds of messages you want emailed to you
that'd be about a 6 line diff. ;)

more involved solution:
- (might still want to change the permission anyway)
- fix the underlying code to match what the description says... once i understood the heart of the problem, i didn't look too closely at the details, so i'm not sure how much more involved this would be. it's probably only a few more lines to get this working...

anyone have strong preferences/opinions how this should be fixed?

dww’s picture

Project: Project » Project issue tracking
Version: x.y.z » 4.7.x-1.x-dev
Assigned: Unassigned » dww

killes agrees that 'administer projects' perms are overkill for these settings. so long as you can edit the project node, you should be able to set this stuff.

that said, i still think i'd fix the code to match the description (if nothing is set, send the email for all states/categories), since that's a more reasonable interface, and is more consistent with how similar things work in other parts of drupal.

assigning to myself since i'm planning to fix this. moving to the right queue while i'm at it. ;)

dww’s picture

bump: http://drupal.org/node/86225 is another duplicate instance of this.

dww’s picture

Status: Active » Needs review
StatusFileSize
new4.21 KB

a) mail.inc now does what the UI description says: if no filters are selected, it sends the email for any value.
b) the filter UI is now available even if you don't have "Administer projects" permissions.

dww’s picture

Status: Needs review » Fixed

committed to DRUPAL-4-7 and DRUPAL-4-7--2, and installed on d.o. yay! ;)

dww’s picture

StatusFileSize
new1.04 KB

grr, apparently, this screws up in some cases and the mail_filter fields aren't in fact arrays at all. so, i had to add an additional check on is_array() in there...

tested on s.d.o, committed to DRUPAL-4-7 and DRUPAL-4-7--2, and installed on d.o.

Anonymous’s picture

Status: Fixed » Closed (fixed)