Page 1 of 1

Clone Project plugin

Posted: 06 Dec 2022, 10:54
by cas
I have created a small plugin that allows cloning of a project including all its dependencies.
It pops up within project maintenance where you can overwrite your default values if required.
I have attached it here and am awaiting your feedback/remarks/suggestions :mrgreen:

The file manage_proj_clone.php which you will find inside the zip-file you need to copy to the root of your mantis installation.
In a future release i Will move that also to the pages directory of the plugin.

Re: Clone Project plugin

Posted: 11 Jan 2024, 05:39
by iame
Hi cas

Thanks for your plugin.
I have installed it, but I faced a problem was that after I clicked the "clone project " button, it appeared an error message : A number was expected for project_id.

Is there any config I miss?? Thanks.


BTW I download it from here : https://github.com/mantisbt-plugins/Cloneproject

Re: Clone Project plugin

Posted: 11 Jan 2024, 07:18
by cas
No, this was a bug I missed. Fixed in version 2.04.
Download updated version on the same place ( https://github.com/mantisbt-plugins/Cloneproject).

Re: Clone Project plugin

Posted: 12 Jan 2024, 05:31
by iame
Thank you! It's work.
But I found another problem and wanted to ask about it.

I have "Copy Sub-Projects" checked but not "Copy Hierarchy"
I thought that Sub-Projects would be newly created, but it seems that only the main project was added, and no sub-projects were added, and the Hierarchy was still copied. (as my picture)

If I check "Copy Sub-Projects", should new sub-projects be created?
(But As far as I know, project names cannot be repeated)

Re: Clone Project plugin

Posted: 12 Jan 2024, 08:09
by cas
Copy Hierarchy means (at least that is the intention) that if the project you clone is a sub-project, the cloned project should be created also as a sub-project. In all other cases it will be created as a top-level project..
As for copying sub-projects, this is possible within Mantisbt. A project can be a sub-project of multiple projects. Sub-project relationship is stored in the Hierarchy table which explains what yyou are seeing in the tables.
So in my view this is ccorect behavior ( once you understand what is meant with "copy hierarchy" ).
Hope this clarifies the behavior.

Re: Clone Project plugin

Posted: 12 Jan 2024, 08:36
by iame
very clear explanation
I see
thank you very much :D