Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#6582 closed enhancement (wontfix)

Timeline RSS doesn't include "author"

Reported by: humberto__digi.com.br Owned by: Christian Boos
Priority: normal Milestone:
Component: timeline Version:
Severity: normal Keywords: patch
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

In my setup, Trac gets usernames from Apache. As they're simple usernames (like "humberto"), the timeline_rss template can't find an e-mail and fails to include the "author" tag.

Here's how I solved it:

  • timeline_rss.cs

    old new  
    2020  /if ?><?cs
    2121  each:event = timeline.events ?>
    2222   <item>
    23     <title><?cs var:event.title ?></title><?cs
    24     if:event.author.email ?>
    25      <author><?cs var:event.author.email ?></author><?cs
    26     /if ?>
     23    <title><?cs var:event.title ?></title>
     24    <author><?cs var:event.author ?></author>
    2725    <pubDate><?cs var:event.date ?></pubDate>
    2826    <link><?cs var:event.href ?></link>
    2927    <guid isPermaLink="false"><?cs var:event.href ?>/<?cs

Attachments (2)

6582-author-in-feed-item-title-r7481.patch (804 bytes ) - added by Remy Blank 16 years ago.
Patch against 0.11-stable adding the author to feed item titles where no <author> tag is generated
6582-author-in-feed-item-title-r7554.patch (804 bytes ) - added by Remy Blank 16 years ago.
Updated patch for current 0.11-stable

Download all attachments as: .zip

Change History (19)

comment:1 by Noah Kantrowitz, 16 years ago

Resolution: wontfix
Status: newclosed

The RSS spec says the author field must be the email address of the author. See here.

comment:2 by Emmanuel Blot, 16 years ago

Milestone: 0.10.5

in reply to:  1 ; comment:3 by humberto__digi.com.br, 16 years ago

Resolution: wontfix
Status: closedreopened

Replying to nkantrowitz:

The RSS spec says the author field must be the email address of the author. See here.

The same page you cited gives an example with a full name:

<author>lawyer@boyer.net (Lawyer Boyer)</author>

And Trac 0.11 lists users correcty even without an e-mail (using another namespace):

<dc:creator>anonymous</dc:creator>

If it works on Trac 0.11, I don't see why the fix couldn't be backported to 0.10.

in reply to:  3 ; comment:4 by Emmanuel Blot, 16 years ago

Resolution: wontfix
Status: reopenedclosed

Replying to humberto__digi.com.br:

If it works on Trac 0.11, I don't see why the fix couldn't be backported to 0.10.

Project policy?
We don't backport minor issues to previous releases. Moreover 0.11 is due in a couple of weeks or so.

0.10.5 will only contain security and major bug fixes - if it is ever released.

in reply to:  4 comment:5 by Christian Boos, 16 years ago

Replying to eblot:

Project policy?

Human resources rather… Anyone is free to step up as an active maintainer of 0.8.x, 0.9.x, 0.10.x, etc. IIRC, some Debian people where sort of maintaining 0.8.x a long time even during the 0.10dev days.

More realistically, if someone at this point wants to take over 0.10 maintenance seriously, perfect, I don't think the Trac project policy is against this. But like manu said, we want to be reasonably sure to be able to make a release 0.10.5 anytime if there's a security fix that needs to be done. So even applying simple patches like the one proposed here requires testing and taking responsibility for the change (like in: if you commit it, you have to be there to fix it when it breaks or breaks something else).

Minimizing the amount of (even trivial) changes is what we can do best to maintain our ability to provide security fix releases, given the lack of active maintainer for that branch.

comment:6 by Markus.Staab, 16 years ago

Resolution: wontfix
Status: closedreopened
Type: defectenhancement
Version: 0.10.4

I think, this would be a nice feature for the 0.11 release..

the autor don't have to be present in the autor field (because there should be the email addy), but could be enclosed in the title..

Current titles look like "TracInstall edited", but could be better "TracInstall edited by cboos". Maybe also the new Rev should be mentioned .?

Also the Changeset could have the format as they have in the timeline, e.g. Changeset [6791] by cboos: Follow-up to r6726, need to fix the annotate links for the changeset …

comment:7 by Markus.Staab, 16 years ago

same for tickets

PS: Be aware, I'm talking about the timeline rss feed.

comment:8 by Christian Boos, 16 years ago

Milestone: 0.11.1

Normally the author should be in the <author> block, but only if there's an e-mail address known for this author. In case it's not there, we could put the author in the title as you suggested.

comment:9 by Christophe Simonis, 16 years ago

A fake email can also be created using the .invalid TLD

For example, I will have the email Christophe.Simonis@trac.invalid

by Remy Blank, 16 years ago

Patch against 0.11-stable adding the author to feed item titles where no <author> tag is generated

in reply to:  8 comment:10 by Remy Blank, 16 years ago

Replying to cboos:

Normally the author should be in the <author> block, but only if there's an e-mail address known for this author. In case it's not there, we could put the author in the title as you suggested.

The patch above does just that: it adds the author to the title when no <author> block is present.

comment:11 by Remy Blank, 16 years ago

Keywords: patch added

by Remy Blank, 16 years ago

Updated patch for current 0.11-stable

comment:12 by Remy Blank, 16 years ago

I'm still looking for a volunteer to review this. Any takers?

comment:13 by Christian Boos, 16 years ago

Looks good to me, except maybe the following part:

...author=format_author(event.author)

shouldn't that be:

author=format_author(author)

in reply to:  13 comment:14 by Remy Blank, 16 years ago

Replying to cboos:

shouldn't that be:

author=format_author(author)

Correct, I got confused in author_or_creator(), where the function argument author is overridden by a py:with.

(OT: Funny how quoting messes up {{{...}}} blocks, I wonder if I could fix this in the wiki formatter…)

comment:15 by Remy Blank, 16 years ago

I'm having second thoughts after re-testing this fix: do we really want the author in the title?

  • It looks really ugly in both feed readers that I have tried (Thunderbird and Akregator).
  • Both readers correctly extract the author from the <dc:creator> tag that is used when no e-mail is available (and therefore no <author> tag is created), so there is no need for duplicating it in the title.

I would tend towards closing this as "wontfix" at this point, as it would impose ugliness to all users. I suppose it could be done in a plugin for people who really want it, in an IRequestFilter.

comment:16 by osimons, 16 years ago

I'm not a big fan of changing this. All my common readers pick the author up nicely, and changing the title for each change by a user without email is not ideal either as some readers (usually email software) use the title to detect threads and highlight other known changes to the resource.

comment:17 by Remy Blank, 16 years ago

Milestone: 0.11.3
Resolution: wontfix
Status: reopenedclosed

Yep, that's another good reason for a "wontfix".

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.