[Trac-tickets] Re: [The Trac Project] #1242: [ER] Generalized automatic cross-references in Trac

The Trac Project noreply at edgewall.com
Fri Mar 11 10:37:37 EST 2005


#1242: [ER] Generalized automatic cross-references in Trac
-------------------------+--------------------------------------------------
       Id:  1242         |      Status:  new                     
Component:  general      |    Modified:  Fri Mar 11 10:37:37 2005
 Severity:  enhancement  |   Milestone:                          
 Priority:  normal       |     Version:  0.8                     
    Owner:  jonas        |    Reporter:  cboos at bct-technology.com
-------------------------+--------------------------------------------------
Comment (by cboos at bct-technology.com):

 = Proposed Implementation =

 == Features ==

 Currently, cross-references between the following Trac objects are
 supported:
  * Wiki page
  * Ticket
  * Changeset
  * Report
  * Milestone
  * Source (only as targets for now)

 Basically, two kinds of references are supported:
  * ''implicit references between objects''[[BR]]
    Implicit references are created for every TracLinks that can be found
    in (any of) the wiki text of a Trac object.
    Indeed, some objects may have separately editable wiki texts,
    each of them being a ''facet'' of this object.
  * ''explicit relation between objects''[[BR]]
    A relation must be created explicitely as such,
    by some programmatic mean.
    Currently, some of the ticket fields are setting up explicit
 relationships.

 The user interface is quite consistent: for every page
 displaying an object which has backlinks, the first navigation link
 is '''Backlinks'''.

 This goes to the {{{/xref}}} module, which displays the source objects
 in a way similar to the {{{Timeline}}}.
 First the relationships are presented, then the implicit links.

 From that page, one can also navigate
 to the '''Forward Links''' (i.e. a summary of the outgoing links)
 and to the '''Orphaned Objects''' (i.e. those not referenced anywhere)

 == Consistency ==

 The data model seems to be pretty solid, and the updates
 seem to work as expected.

 == How to install? ==

 It is a clean patch made on the trunk as of today ([1343]).

 It contains some database schema modification,
 so there is an {{{upgrades/db10.py}}} file.

 So the recommended way to proceed is to use {{{trac-admin}}}, and:
  * upgrade
  * xref
  * resync

 I left some 'print' statements on purpose, they should highlight
 what is going on when cross-references are created/deleted.

 == To be continued ==

 This was really a very interesting task, I hope you will enjoy
 the results.

 There are of course a few things that can be done from there:

 === Trac Objects ===

  * The patch is not very intrusive, it doesn't change the way
    the Trac internals work, __but__ a very logical next step
    would be to program this in a more ''O-O'' way...
    which bring us in a very concrete way now in the direction
    of the  TracObjectModelProposal (which will be re-edited shortly
    to reflect the experience gained while doing this patch)
  * In that framework, the xref trac-admin command will
    be able to handle relations (currently, relations
    only work for new tickets and modification of tickets,
    for the ''milestone'' and ''component'' fields)

 === Other things ===
  * A small change for the ticket comments was to introduce
    their numbering. This will also facilitate their editing
    (see #454). I also have some ideas for having threaded comments.
  * Some additional synonyms have been introduced:
    * ''issue'' is synonym to ''ticket''
    * ''source'', ''repos'' and ''browser'' are now also synonyms in URLs

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/1242>
The Trac Project <>


More information about the Trac-Tickets mailing list