Project

General

Profile

Copy project

Added by Luis Serrano Aranda about 13 years ago

I want to make a patch to copy subprojects in Redmine,

This feature would be useful to create templates of the project (with subprojects), just change the name of the parent project and keep the name of the subprojects.

I'm trying to make a patch, if someone could help me I would appreciate (funcion of lft rgt),
I think lft is the next subproject in the branch until rgt is lft+1, if this lft is not the lft of the parent+1 exit more subproject in the parent.

In the parent project (the first) rgt is the number+1 of the rgt of the last subproject and if the project don't have subprojects rgt = lft + 1

Is this correct ?

I'll write my progress here

Thanks


Replies (4)

RE: Copy project - Added by Etienne Massip about 13 years ago

P1--> lft 1
|-P2--> lft 2
| |
| v
| rgt 3
|-P3--> lft 4
| |
| v
| rgt 5
v
rgt 6

P4--> lft 7
|
v
rgt 8

etc.

If you want a project with its subprojects : project.self_and_descendants (see source:trunk/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb)

RE: Copy project - Added by Luis Serrano Aranda about 13 years ago

awesome_nested it's a plugin wich makes the copy of projects and subprojects ?

RE: Copy project - Added by Etienne Massip about 13 years ago

Luis Serrano Aranda wrote:

awesome_nested it's a plugin wich makes the copy of projects and subprojects ?

Nope, it's a plugin which is used to manage project and issue (for subtasking) hierarchy trees.

RE: Copy project - Added by Luis Serrano Aranda about 13 years ago

Thanks, thanks, I will review the methods to see if they will help me

    (1-4/4)