Edgewall Software

Ticket #2639 (new enhancement)

Opened 3 years ago

Last modified 16 months ago

Add userid/author in RSS feeds for repository commit information

Reported by: Dan <trac@…> Owned by: cboos
Priority: normal Milestone: 0.13
Component: timeline Version: 0.10rc1
Severity: normal Keywords: rss
Cc:

Description

We have an interest in using the RSS feed feature of Trac. Besides the issues described in #2580, which I am very happy to see resolved, we would also like to see the changeset author's name in the RSS feed information.

For instance, when subscribing to the Timeline's RSS feed, you would see a title such as: Changeset [614]: Fixed reset procedure., with a body of Fixed reset procedure.. There is apparently no author information, although this is a very useful part of the Timline page itself.

It appears to me that the revison log RSS feed is also hobbled in this way.

Attachments

Change History

  Changed 3 years ago by mgood

  • status changed from new to closed
  • resolution set to worksforme

The author information is added if the author has set their email address in their Trac settings. RSS requires the author to be a valid email address, so this element is omitted unless Trac has an email address to use for it.

  Changed 3 years ago by Dan <trac@…>

Ah ... sorry about that. I guess I haven't gotten the guys to update the settings for all the projects. (Reference: #2245.) It seems that we have about 25 active projects at any given time, and we cycle through fairly regularly. I have created a separate TRAC_ENV_PARENT_DIR area specifically for the new project hatchery, which helps keep down maintenance of the server. The projects are moved from the hatchery to an active project area at my leisure, and finally moved to an archive area when the work is completed.

Keeping each project separate, as with the current implementation, is actually quite convenient for us. I realize that "proper" multi-project operation is slated for some time in the future, but the current implementation has its advantages -- each project can be archived independently. This allows us to easily create backups for individual clients. We can even serve each project for access by the client while we're doing development, if so desired. Of course, each client's information must remain confidential, which is why the independence of projects is so useful.

Thanks again.

  Changed 2 years ago by trac@…

  • status changed from closed to reopened
  • version changed from 0.9.3 to 0.10rc1
  • resolution worksforme deleted

How about keying off of smtp_default_domain, which was added in 0.10, to come up with the author's address? Developers receive ticket notification e-mails wihtout needing to configure the settings now, so it would be nice to see the author name in the RSS feed based on this feature as well.

  Changed 2 years ago by anonymous

Here's what I added (see below). Stole it out of the notification code, but it's not quite complete (no check to see if name is a valid e-mail name, but all of our user names are valid e-mail names). Gets me by for now, and I can finally tell who's making the commit.

                    elif author != 'anonymous':
                        domain = self.config.get('notification', 'smtp_default_domain')
                        if domain:
                            event['author.email'] = "%s@%s" % (author, domain)

follow-up: ↓ 6   Changed 2 years ago by cboos

  • keywords rss added
  • owner changed from jonas to cboos
  • status changed from reopened to new
  • milestone set to 0.11

#3276 closed as duplicate.

in reply to: ↑ 5 ; follow-up: ↓ 7   Changed 19 months ago by corvinonathan

Replying to cboos:

#3276 closed as duplicate.

Thanks for the work around. In what file was the change made? If possible, could you provide a couple lines of context? Thanks!

in reply to: ↑ 6   Changed 19 months ago by Dan <trac@…>

Replying to corvinonathan:

Thanks for the work around. In what file was the change made? If possible, could you provide a couple lines of context? Thanks!

It goes into Timeline.py:

               if author:
                    # For RSS, author must be an email address
                    if author.find('@') != -1:
                        event['author.email'] = author
                    elif email_map.has_key(author):
                        event['author.email'] = email_map[author]
                    elif author != 'anonymous':
                        domain = self.config.get('notification', 'smtp_default_domain')
                        if domain:
                            event['author.email'] = "%s@%s" % (author, domain)
                event['date'] = http_date(date)

  Changed 18 months ago by cboos

  • milestone changed from 0.11 to 0.12

Probably related to #2456, so not for 0.11.

  Changed 16 months ago by cboos

#5309 was closed as duplicate.

Add/Change #2639 (Add userid/author in RSS feeds for repository commit information)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change. Next status will be 'new'
The owner will change to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.