Edgewall Software
Modify

Opened 9 years ago

Closed 9 years ago

Last modified 5 months ago

#1414 closed enhancement (fixed)

User-defined trac links using same colon syntax as reports, tickets etc

Reported by: walter.nicholls@… Owned by: cboos
Priority: high Milestone: 0.10
Component: wiki system Version: devel
Severity: normal Keywords: intertrac, traclinks
Cc:
Release Notes:
API Changes:

Description

Add ability to map TracLink -style prefixes to URLs. For example define somewhere that text with a "case:" prefix, eg:

  case:123

.. is mapped to the hyperlink

  http://mycrmserver/viewcase.php?case_number=123

This should also support long text descriptions as described in #185, ie

  [case:123 Request from Allied Widgets inc for this report]

This can be done in a clumsy way now with a WikiMacro, but this does not work inside subversion change comments, which is where I would find it most useful.

Possible implementation: could be defined in trac.ini like so:

  [linktranslation]
   case = http://remedy.foocorp.com/case/#1 

This would require changes to the Wiki parser to build the regular expressions more dynamically than currently.

The output of this could be rendered as an external link, even better would be if this was configurable.

Also, would be nice if we could override the standard ones, etc make "ticket:" point to our own trouble ticket system, outside of Trac.

Attachments (0)

Change History (13)

comment:1 Changed 9 years ago by cboos

  • Owner changed from jonas to cboos
  • Status changed from new to assigned

Though the plan is certainly to support TracLinks extensions with modules once we have pluggable modules, I nevertheless think that the lightweight TracLinks you suggested are worth implementing.

I'm currently refactoring the WikiFormatter.py to make it a little bit more modular, in source:branches/cboos-dev/intertrac-branch/trac/WikiFormatter.py (though I haven't commited anything there, as of this writting)

With my changes, it will be esay to implement this enhancement request.

E.g: mantis:0000542 should be replaced by http://dmachine/mantis/bug_view_page.php?bug_id=0000542 if I have:

[linktranslation]
   mantis = http://dmachine/mantis/bug_view_page.php?bug_id=$1 

(#1 might be a valid part of the URL, whereas $ is seldom used in URLs, right?)

comment:2 Changed 9 years ago by mgood

[1856] adds a TracPluggableModules extension for allowing components to provide their Wiki link syntax.

I'll leave this open for the suggested configurable formats in the TracIni.

comment:3 Changed 9 years ago by cboos

  • Milestone set to 0.9

This feature has been implemented in r1908 in the InterTrac branch, as an extension to traditional InterWiki links.

comment:4 Changed 9 years ago by cboos

  • Milestone changed from 0.9 to 1.0

This will be post-poned to 1.0.

The InterTrac branch will be actively maintained meanwhile, and a patch for each released 0.9 version will be attached to ticket #234.

comment:5 Changed 9 years ago by cboos

In fact, I created a special purpose ticket for the branch integration: #2041. You can find the patches against 0.9.x there.

comment:6 Changed 9 years ago by cboos

  • Component changed from general to wiki
  • Keywords intertrac added; removed

comment:7 Changed 9 years ago by cboos

  • Milestone changed from 1.0 to 0.10
  • Priority changed from normal to high

TODO also use the arguments in the description, e.g.

{{{
...
TracDev http://thread.gmane.org/gmane.comp.version-control.subversion.trac.devel/%1         # Mail [%1] in Trac-Dev mailing List
...
}}}

comment:8 Changed 9 years ago by cmlenz

Why high priority? It should already be possible to do this with a plugin.

comment:9 Changed 9 years ago by cboos

… because it's already there in the InterTrac branch, and I see no need to ask users to get a plugin for this when it can easily be part of the core InterWiki functionality.

Actually, those plugins wouldn't even exist if the InterTrac branch had been merged earlier, as this is working for more than half a year already.

comment:10 Changed 9 years ago by cboos

  • Resolution set to fixed
  • Status changed from assigned to closed

This feature is now availabe for trunk (r2839), as part of the InterWiki. See InterMapTxt for the documentation.

comment:11 Changed 5 months ago by rjollos

  • Keywords changed from traclinks intertrac to traclinks, intertrac

comment:12 Changed 5 months ago by rjollos

  • Keywords traclink added; traclinks removed

comment:13 Changed 5 months ago by rjollos

  • Keywords traclinks added; traclink removed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed The owner will remain cboos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from cboos to the specified user.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.