Question

We have a multiproject trac, with about 10 trac sites for them. The svn repository is the same for all the projects because the projects are different applications but share common libraries. When we close a ticket for a project, we write down the ticket ID in the svn log message, to setup a link between the SVN revision and the Trac ticket, and vice-versa. The bad thing is that because of multiproject Trac, the ticket ID is not unique. In other words, the ticket #1 may refer to Trac project 1, 2, or 3... Is there a way to tell the Trac to use unique Ticket IDs beween all the projects managed by it? Thank you in advance.

Was it helpful?

Solution

You can't tell Trac to use unique ticket numbers between projects, but you can change the way you write ticket numbers so that Trac knows which one you're referring to.

Trac has a type of link called an InterTrac Link that references a resource in a specific Trac project (even on another server). You configure an InterTrac link by adding a section like this to your trac.ini file:

[intertrac]
s = sample
sample.title = Some Trac project on the server
sample.url = http://sample.yourserver.com

Now, you can refer to resources in that specific Trac project by doing things like:

sample:ticket:502
s:ticket:502
s:#502
#S502

All of the above would link to ticket #502 in the Trac project called "sample". You can use this sort of syntax to reference any resource in the target Trac project (see the Trac documentation listed above for details and more examples). If all of your Trac projects use the same InterTrac link settings, then they can all use a single syntax to uniquely address resources across projects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top