Ticket #3167 (closed defect: fixed)
Opened 6 years ago
Last modified 5 years ago
Trac RSS feeds lack GUID elements
| Reported by: | exarkun@… | Owned by: | eblot |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.10.1 |
| Component: | general | Version: | 0.9.5 |
| Severity: | normal | Keywords: | review |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
RSS 2.0 has per-item guids. These let clients unambiguously determine the identity of feed items and do such things as handle read/unread status correctly. Trac should include a guid element in each item element in its feeds.
Attachments
Change History
Changed 5 years ago by anonymous
- Attachment Timeline.diff added
Changed 5 years ago by anonymous
- Attachment timeline_rss.diff added
comment:1 follow-up: ↓ 3 Changed 5 years ago by anonymous
comment:2 Changed 5 years ago by cmlenz
I'd rather see us support permalinks for all entry instead of artificial GUIDs. Trunk already does that for tickets, and we should probably do the same for ticket changes.
comment:3 in reply to: ↑ 1 ; follow-up: ↓ 4 Changed 5 years ago by mgood
Replying to anonymous:
I've attached a patch that adds a guid element to the Timeline feed...
It's easier if you attach a single patch file instead of separate diffs for each file you changed. See TracDev/SubmittingPatches.
I agree with cmlenz that we should use permalinks here. It seems like this would require a change to the return value of ITimelineEventProvider.get_timeline_events so each module could provide its own permalinks, so this should probably be made before the 0.10 release, or post-poned to 0.11.
comment:4 in reply to: ↑ 3 Changed 5 years ago by cmlenz
Replying to mgood:
I agree with cmlenz that we should use permalinks here. It seems like this would
require a change to the return value of ITimelineEventProvider.get_timeline_events
so each module could provide its own permalinks, so this should probably be made
before the 0.10 release, or post-poned to 0.11.
I don't see why an interface change would be needed. If it makes sense for the RSS feed to use a link to a specific version/comment of a page, why shouldn't the timeline itself do the same? I.e. the providers should return unique links for the events, and the timeline RSS feed just reuses those for the permalinks.
comment:5 Changed 5 years ago by eblot
- Owner changed from jonas to eblot
- Status changed from new to assigned
I tried to have a look at this ticket. I'm attaching a patch.
For the timeline feed, we need to add an extra information to the HDF: the date, unformatted.
This is required for wiki page edition, as the link is always the same for any version of the same wiki page, which would make the guid not unique.
For the feed an event is always unique:
- report: ticket number
- query: ticket number
- ticket: ticket and comment number
- repository log: version number (only tested w/ SVN)
I've submitted 5 feed samples (on for each feed source) to the w3c validator and all of them have been repored as valid, without warnings.
Changed 5 years ago by eblot
Proposed patch against r3813 to support RSS guids
comment:6 Changed 5 years ago by eblot
- Keywords review added
comment:7 Changed 5 years ago by eblot
As cmlenz noticed (on IRC) guids should not be declared as permalinks, as ticket&wiki pages can be edited/deleted which mean that URL can stop to point to valid pages or point to pages whose content has changed.
comment:8 Changed 5 years ago by eblot
- Milestone set to 0.10.1
- Resolution set to fixed
- Status changed from assigned to closed



I've attached a patch that adds a guid element to the Timeline feed... The guid value is a md5 hash build from the link to, and the date of, the event (hence, it is no PermaLink, i.e. isPermaLink="false"!!)
The patches apply to Timeline.py and timeline_rss.cs of Trac version 0.9.6...
To find out more about the patch, have a look at http://dawis2.icb.uni-due.de/jpddtools/AddGuidToTimelineFeedPatch.html
nik4536