Closed (fixed)
Project:
Project issue tracking
Version:
6.x-1.x-dev
Component:
Mail
Priority:
Critical
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
20 Jan 2009 at 19:24 UTC
Updated:
3 Jan 2014 at 00:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mr.baileysAlso related:
Comment #2
mr.baileysAttached is a first stab at converting "mail.inc" from the old drupal_mail format to the new one.
The original contents of project_mail_notify have been split up into:
I have tried to keep the original logic whenever possible, and refrained from making any other changes than those required for the port itself. I did have to juggle some of the sections around. So far my tests have been limited to just a couple of issues/comments/users, but it seems to be running as it should without any errors. I'll be running a larger battery of tests later on to confirm that everything is working as expected.
PS. the subscribe page at /projects/issues/subscribe-mail is currently not usable, so on fresh install you might have to insert some records into project_subscriptions if you want to review/test this patch.
All comments welcome!
Comment #3
aclight commentedIn D6, node_access() takes a new optional 3rd parameter, $account. Do we want to alter the call to node_access() to use this parameter when we check to see if a user should get the email or not.
Comment #4
mr.baileysI think that definitely makes sense. I've changed the following code
to:
Additional changes:
Attached is an updated patch. Although it seems to work as advertised and without any errors, I'm going to keep this issue at CNW until I have been able to run a larger batch of tests. I'm having some problems getting issue generation to work on my D6 test site, so I'll be addressing that first.
And one question: currently there's only one include, cron.inc, in the includes-folder, and three in the root (mail.inc, issue.inc & comment.inc). Should we move these into the includes-folder as well to keep things tidy? If yes, I think moving mail.inc into includes should be addressed as part of this issue.
Comment #5
dwwThanks for all your work on this, and sorry I haven't had time to spare reviewing this more closely yet. If not before, expect this to land on Monday at the d.o upgrade sprint. ;)
"Should we move these into the includes-folder as well to keep things tidy?"
No. The existing .inc file split for mail.inc, comment.inc + issue.inc is a joke, and a hold over from how this code was written 6+ years ago. What we should really do is do a proper page split so that code is only loaded when it's needed (currently all of project_issue/*.inc are included on every page load regardless). However, I don't want to do the real page split until more of the fundamentals are working. The page split is a performance boost, but it's mostly icing on the cake. We need the cake, first. ;) So, no, please don't try to move mail.inc into includes just yet.
Thanks,
-Derek
Comment #6
dwwCool, that's a big help, thanks!
A) The last call to drupal_mail() needs to use
$project->project_issue['mail_copy']as the recipient, not$recipient->mail(which is empty at this point).B) project_mail_generate_followup_mail_body() is still broken. You don't get any of the info about the issue metadata changes for each comment in the email.
I fixed (A) and committed to HEAD, setting back to active for (B).
Comment #7
mr.baileysI don't think I understand what you mean by this one. No changes were made to project_mail_generate_followup_mail_body() in this patch, but the emails I receive contain the metadata changes table at the top of each email, including the "change markers". Should the same metadata table be displayed for each comment in the history also? This doesn't seem to be the case for the emails currently sent for d.o. issue updates.
Comment #8
dwwHeh, that's because I thought that's how it worked, but looking more closely, you're right. ;) Tee hee. Guess that'd be a separate feature request, not part of this porting task, so this is now fixed. Yay!
Thanks again for this, and all your help with the project* issue queues these days!