Clone Project plugin

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

Post Reply
cas
Posts: 1641
Joined: 11 Mar 2006, 16:08
Contact:

Clone Project plugin

Post 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.
Attachments
Cloneproject.zip
(18.19 KiB) Downloaded 4267 times
iame
Posts: 18
Joined: 01 Sep 2023, 02:00

Re: Clone Project plugin

Post 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
Attachments
error203.png
error203.png (37.74 KiB) Viewed 95694 times
cas
Posts: 1641
Joined: 11 Mar 2006, 16:08
Contact:

Re: Clone Project plugin

Post 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).
iame
Posts: 18
Joined: 01 Sep 2023, 02:00

Re: Clone Project plugin

Post 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)
Attachments
subprojectissue.png
subprojectissue.png (73.24 KiB) Viewed 94697 times
cas
Posts: 1641
Joined: 11 Mar 2006, 16:08
Contact:

Re: Clone Project plugin

Post 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.
iame
Posts: 18
Joined: 01 Sep 2023, 02:00

Re: Clone Project plugin

Post by iame »

very clear explanation
I see
thank you very much :D
Post Reply