Edgewall Software

Changes between Version 5 and Version 6 of TracCrossReferences


Ignore:
Timestamp:
Sep 1, 2005, 4:12:25 PM (19 years ago)
Author:
Christian Boos
Comment:

Added more references to existing tickets

Legend:

Unmodified
Added
Removed
Modified
  • TracCrossReferences

    v5 v6  
    88
    99A cross-reference is a link from a Trac object (the ''source'')
    10 to another Trac object (the ''destination'').
     10to another Trac object (the ''target'').
    1111
    1212Usually, such links are created after processing some Wiki text
     
    1717 * Wiki page ''(has the Cross-references navigation link)''
    1818   * content facet                 ''(done)''
    19    * attachment comment facets
     19   * attachment comment facets     ''<<depends-on #787>>''
    2020 * Ticket    ''(has the Cross-references navigation link)''
    2121   * ~~summary facet~~ (seems that it was never
     
    2323   * description facet             ''(done)''
    2424   * comments facets               ''(done)''
    25    * attachment comment facets
     25   * attachment comment facets     ''<<depends-on #787>>''
    2626   * (more to come...)
    2727 * Changeset
    2828   * log message facet
    2929 * Report
    30    * title facet
     30   * ~~title facet~~               ''(see summary facet above)''
    3131   * description facet
    3232 * Milestone
    33    * title facet
     33   * ~~title facet~~               ''(see summary facet above)''
    3434   * description facet
    3535 * Source
     
    4040A cross-reference is also called a ''relation'' when
    4141an explicit semantic is attached to the link
    42 from the source object to the destination object.
     42from the source object to the target object.
    4343
    4444If there's no relation defined, one simply knows that the two objects
     
    6464For example, the ticket form could be extended to include
    6565a '''duplicate of''' field, activated when the resolution
    66 type is set to ''duplicate''.
     66type is set to ''duplicate'' (see #1395).
    6767The content of that field would be a facet for the ticket
    6868and any reference found in the facet will create a specific
     
    7676from the current object to any other Trac object.
    7777
    78 I would propose using `<<...>>`, which can be nicely rendered
    79 in HTML by [[html(&laquo;...&raquo;)]].
     78I would propose using `<<the-relation LinkToTargetedObject>>`,
     79which can be nicely rendered in HTML as
     80[[html(&laquo;the-relation)]]LinkToTargetedObject[[html(&raquo;)]].
    8081
    81 Example, with the `tag` relation:
     82Example, using the `tag` relation (should it be `has-tag`?):
    8283Writing
    8384{{{
     
    9293<<tag xref, idea, #1242>>
    9394}}}
    94 Would tag this page with the all those 3 objects
     95Would tag this page with all those 3 objects
    9596
    9697''Undecided issue:'' [[BR]]
     
    111112   the `rel`
    112113 * `Closure(rel)` would provide a brief listing of all Trac objects in
    113    the transitive closure of the specified relation.
    114  * `Count(rel)` would provide a count of the objects matchin the `rel`
     114   the transitive closure of the specified relation
     115 * `Count(rel)` would provide a count of the objects matching the `rel`
    115116
    116 The relation description `rel` can be using a similar syntax to the wiki one:
    117  * `<<*rel* ...>>` would refer to the source objects
    118    related to the specified target by relation `*rel*`
     117The relation description `rel` could be written using a similar syntax
     118to the one used for the wiki and described above.
     119
     120The idea being that if there exists a relation `<<A relates-to B>>`
     121then specifying:
     122 * `<<A relates-to>>` should result in `B`
     123 * `<<relates-to B>>` should result in `A`
     124
     125Some concrete examples:
     126 * `<<*rel* *tgt*>>` would refer to the source objects
     127   related to the specified target object `*tgt*` by the relation `*rel*`.
     128   Examples:
    119129   * `<<tag xref>>` all the objects having the `xref` tag
    120130   * `<<depends-on #123>>` all the objects that depend on the ticket !#123
    121    * Special object patterns: `.` and `%`
     131   * Special object patterns: "." and "%"
    122132     * `<<depends-on .>>`  all the objects that depend on the current object
    123      * `<<depends-on>>` same as above, `.` is the target if none given
     133     * `<<depends-on>>` same as above, "." is the target if none given
    124134     * `<<tag CS103/%>>` all the objects having a tag which name
    125135       starts with `CS103`
    126  * `<<... *rel*>>` would refer to the target objects
    127    related to the specified source by relation `*rel*`
     136 * `<<*src* *rel*>>` would refer to the target objects
     137   related to the specified source object `*src*` by the relation `*rel*`.
     138   Examples:
    128139   * `<<. tag>>` would list all tags of the current object
    129140   * `<<% tag>>` would list all tags of any object
     
    136147
    137148The [source:branches/cboos-dev/xref-branch xref] branch
    138 currently contains an implementation for it.
    139 It's kept in sync with all my other branches
     149currently contains an implementation of the cross-references,
     150plus the infrastructure needed for the relations.
     151That branch is kept in sync with all my other branches
    140152(TracDiff and InterTrac) and, as such,
    141 is also kept in sync with the trunk on a regular basis.
     153it is also quite in sync with the trunk.
    142154
    143155See also:
     
    146158 * Relationship and ticket dependencies support: #31, #226 and #886
    147159 * Wiki Page renames: #1106
     160 * Other relationships: #449, #508
    148161
    149162=== Refactoring Ideas ===
     
    158171 * the ticket components could be be reimplemented using a
    159172   ''has-component'' relation, with the components being
    160    wiki pages (1). The advantage would be that a ticket could have multiple
    161    components, and that the component could be documented and used in a
    162    meaningful way in other relationships (e.g. #548, #1678 and
     173   wiki pages [wiki:TracCrossReferences#a1 (1)]. [[comment(foot notes, anyone?)]]
     174   The advantage would be that a ticket could have multiple
     175   components (#1730), and that the component could be documented (#1233)
     176   and used in a meaningful way in other relationships (e.g. #548, #1678 and
    163177   TracMultipleProjects/SingleEnvironment#UsingComponentobjects)
    164178 * idem for the versions, using a ''has-version'' relation
    165179
    166180----
    167  (1)::
    168    ... Wiki pages created from a !ComponentTemplate page, therefore
    169    having an ''is-a'' relationship to the above !ComponentTemplate page.
    170    This makes it simple to retrieve all components:
    171    those are the `[[Relation(<<is-a ComponentTemplate>>)]]` objects,
    172    or, in Python code,
    173    {{{
     181===== (1) =====
     182Components would be Wiki pages created from a !ComponentTemplate page, therefore
     183having an ''is-a'' relationship to the above !ComponentTemplate page.
     184This makes it simple to retrieve all components:
     185those are the `[[Relation(<<is-a ComponentTemplate>>)]]` objects,
     186or, in Python code,
     187{{{
    174188#!python
    175189  components = WikiPage(self.env, 'ComponentTemplate').sources('is-a')
    176    }}}
    177    Of course, the !ComponentTemplate ''is-a'' !TemplateTemplate...
     190}}}
     191Of course, the !ComponentTemplate ''is-a'' !TemplateTemplate...