Edgewall Software

Ticket #3876 (closed enhancement: fixed)

Opened 2 years ago

Last modified 5 months ago

Intertrac multi-projects

Reported by: adriano.vieira@… Owned by: cboos
Priority: high Milestone: 0.10.1
Component: project Version: 0.10
Severity: normal Keywords: intertrac
Cc:

Description (last modified by cboos) (diff)

How could I use multi-project on "intertrac"?

I would like to link my "big trac" to other projects (more then one). Is it possible?

Example:

[intertrac]
# -- Link to an external Trac: Project One
project.One.title = InterTrac to "Project One"
project.One.url = http://trac/project.one
project.One.compat = false

# -- Link to an external Trac: Project Two
project.two.title = InterTrac to "Project Two"
project.two.url = http://trac/project.two
project.two.compat = false

# -- Link to an external Trac: Project N
project.N.title = InterTrac to "Project N"
project.N.url = http://trac/project.N
project.N.compat = false

Attachments

Change History

  Changed 2 years ago by cboos

  • keywords intertrac added
  • owner changed from jonas to cboos
  • description modified (diff)
  • milestone set to 0.10.1

That's how it's supposed to work... oh, I think I see the problem. You have the "." character in the project names, right?

  Changed 2 years ago by adriano.vieira@…

Yes! We have a lot projects and - like a java package ;) - they have a dot (".") to separate all of them (projects and subprojects). ;)

We need this structure, sorry! :-D

Example:

[intertrac]
# -- Link to an external Trac: Project One
project.One.title = InterTrac to "Project One"
project.One.url = http://trac/project.one
project.One.compat = false

# -- Link to an external Trac: Sub Project One of One
project.One.sub.one.title = InterTrac to "Project One"
project.One.sub.one.url = http://trac/project.one.sub.one
project.One.sub.one.compat = false

# -- Link to an external Trac: Sub Project two of One
project.One.sub.two.title = InterTrac to "Sub Project two of One"
project.One.sub.two.url = http://trac/project.one.sub.two
project.One.sub.two.compat = false

# -- Link to an external Trac: Project Two
project.two.title = InterTrac to "Project Two"
project.two.url = http://trac/project.two
project.two.compat = false

# -- Link to an external Trac: Project N
project.N.title = InterTrac to "Project N"
project.N.url = http://trac/project.N
project.N.compat = false

# -- Link to an external Trac: Sub Project M of N
project.N.sub.M.title = InterTrac to "Sub Project M of N"
project.N.sub.M.url = http://trac/project.n.sub.m
project.N.sub.M.compat = false

Thanks a lot by your great job.

Adriano Vieira

  Changed 2 years ago by cboos

  • status changed from new to assigned

This should do the trick:

Index: trac/wiki/intertrac.py
===================================================================
--- trac/wiki/intertrac.py	(revision 3880)
+++ trac/wiki/intertrac.py	(working copy)
@@ -61,8 +61,9 @@
     def render_macro(self, req, name, content):
         intertracs = {}
         for key, value in self.config.options('intertrac'):
-            if '.' in key:
-                prefix, attribute = key.split('.', 1)
+            idx = key.rfind('.') # rsplit only in 2.4
+            if idx > 0: # 0 itself doesn't help much: .xxx = ...
+                prefix, attribute = key[:idx], key[idx+1:]
                 intertrac = intertracs.setdefault(prefix, {})
                 intertrac[attribute] = value
             else:

Can you test the patch please?

follow-up: ↓ 5   Changed 2 years ago by adriano.vieira@…

  • status changed from assigned to closed
  • resolution set to fixed

That's great, cboss!

For now it's working fine. I will continue to test/using it. Anything else I will report here.

Thans a lot.

Adriano

in reply to: ↑ 4   Changed 2 years ago by cboos

Replying to adriano.vieira@mte.gov.br:

That's great, cboss!

cboos ;)

OK, fix committed [3889:3890].

  Changed 8 months ago by jayunit100@…

  • priority changed from high to normal
  • status changed from closed to reopened
  • resolution fixed deleted

Hi I have several projects that my group is working on. Right now each is a different trac project.

Is there a way we can merge all these projects so that I can view all my tickets at once ?

In general, is there a way to have a "subproject" type in trac?

This would be nice because most software developers work on many projects at once, and being able to manage all accounts, tickets, etc from a global perspective sure would save me time... My group has 5 different projects which are completely different, therefore requireing different milestones, but have the same developer team.

Please let me know how this is possible with trac

  Changed 5 months ago by Chris Mulligan <chris.mulligan@…>

  • priority changed from normal to high
  • status changed from reopened to closed
  • resolution set to fixed

Resetting to previous. Jayunit100 - please email trac users if you still have questions.

Add/Change #3876 (Intertrac multi-projects)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.