Edgewall Software

Version 3 (modified by anonymous, 19 years ago) ( diff )

Cross-References in Trac

As Trac is a little bit more than a Wiki, its backlinks are a little bit more powerful than traditional backlinks… Therefore we should rather talk about cross-references.

A cross-reference is a link from a Trac object (the source) to another Trac object (the destination).

Usually, such links are created after processing some Wiki text attached to the source object (a facet of that object).

Here's the current list of Trac objects that can reference each other, along with their facets:

  • Wiki page
    • content facet
    • attachment comment facets
  • Ticket
    • summary facet
    • description facet
    • comments facets
    • attachment comment facets
    • (more to come…)
  • Changeset
    • log message facet
  • Report
    • title facet
    • description facet
  • Milestone
    • title facet
    • description facet
  • Source
    • (no facet, only as a target)

A cross-reference is also called a relation if a specific semantic is attached to the link from the source object to the destination object. If there's no relation defined, one simply knowns that the two objects are somehow related, like for traditional backlinks (however, for a backlink, Trac will also show the text that surrounds the link in the source Wiki text).

Those relations can be used to fulfill many needs. The ticket dependencies feature is one example.


Implementation Notes

The xref branch currently contains an implementation for it, and work is in progress to adapt it for trunk integration (any comments welcomed, of course).

See also:

  • The original enhancement request ticket: #1242
  • Backlink support: #611 and #646
  • Relationship and ticket dependencies support: #31 and #226
  • wiki page renames: #1106

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.