Mailing List Archive

email notification stuff
I just tried out the email notification support. A few comments:

- It seems redundant putting the project name both in the "From:" line
and in the subject... it also made me shorten one of my project
names.

- I needed to add 'link' under the [project] section in trac.ini to
get an X-URL in the email; this isn't populated by default and
doesn't seem to be documented

- I can't get the X-Trac-Ticket-URL to show me a URL including the
server name. I traced the code a bit and it seems it gets something
from SCRIPT_NAME, but I even manually set that in the Apache config:

SetEnv SCRIPT_NAME "https://source.med.uiuc.edu/trac/WebRoot"

with no luck; I guess the CGI handler overwrites it. Shouldn't it
just use the 'link' URL as above, or isn't that what it's for?

- The separator before the signature-like thing at the bottom of the
message:

--
Ticket URL: </trac/WebRoot/ticket/10>
UICOM-UC WebRoot <http://trac.edgewall.com/>

should have a space after the hyphens ("-- ") in order to be
recognized by email clients which colorize/relocate/remove such
things.

Otherwise, looks great; I love the ASCII table formatting :)

--
=Nicholas Riley <njriley@uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>
email notification stuff [ In reply to ]
Nicholas Riley wrote:

> - It seems redundant putting the project name both in the "From:" line
> and in the subject...

Good point. Maybe we should even have a config variable with a formatting
string for the Subject-header.

> - I needed to add 'link' under the [project] section in trac.ini to
> get an X-URL in the email; this isn't populated by default and
> doesn't seem to be documented

It's a bug and my bad. It's supposed to be project.url (as specified when
running 'trac-admin foo initdb').

> - I can't get the X-Trac-Ticket-URL to show me a URL including the
> server name.

This is actually a [potential] issue with the Href class. The Href stuff
should probably generate absolute paths for links instead of relative ones,
making it more robust/portable. It would be nice to always rely on
'env.href.ticket(42)' always being a valid and useful URL no matter what context.

> Shouldn't it just use the 'link' URL as above, or isn't that what it's
> for?

No, the project.url link is 'unreliable', because the Trac instance for a
project might not be the same as the base URL for the project itself. Compare
'Home page' and 'Project' in GForge/SourceForge.

> - The separator before the signature-like thing at the bottom of the
> message should have a space after the hyphens

Absolutely correct. Fixed in [484] (smallest changeset so far?)

Thanks for testing the notification stuff, I believe you're the first test
pilot on that stuff. :)

--
Daniel Lundin | Edgewall Software
daniel@edgewall.com | Professional Linux & Open Source Consulting
| http://www.edgewall.com/