How can I add "Clone" issue to group action dropdown

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
cor3huis
Posts: 21
Joined: 15 Jan 2010, 21:24

How can I add "Clone" issue to group action dropdown

Post by cor3huis »

QUESTION:
:?: How can I add "Clone" issue to group action dropdown in a simple way?

See the attatched screenshot for the dropdown I'm referring to and want to extend.
Screenshot of dropdown that is referred to
Screenshot of dropdown that is referred to
HowToAddAandRemoveItemsInThisMantisBTDropDown.jpg (24.82 KiB) Viewed 8822 times
USING:
Mantis 1.2.5

DESCRIPTION:
* On the View all issue page, if one does a multiple select, then you can choose a specific action. However "Clone" is not one of them.
* "Cloning" bug is prefered to sub-projects, not "Copy". The reason is that copy drags all the notes with it in the "Copied" issue and that is not really benificial.
* There exist a config variable $g_custom_group_actions but no single example of how to use this. An example to create this array would already be helpful.
* A solution to only alter the config_inc.php and not adding code to the core Mantis source would ofcourse be best.

NOTES:

Maybe this old 1.1.x info is also related and helpfull to find a solution
http://www.mantisbt.org/wiki/doku.php/m ... issue:7900

I realize implementation is in core/print_api.php

...
function print_all_bug_action_option_list() {
$commands = array(
'MOVE' => lang_get( 'actiongroup_menu_move' ),
'COPY' => lang_get( 'actiongroup_menu_copy' ),
...

Any help solving the issue is really appriciated :D
cor3huis
Posts: 21
Joined: 15 Jan 2010, 21:24

Re: How can I add "Clone" issue to group action dropdown

Post by cor3huis »

Updated the subject to be more descriptive, it would be great if someone could give a hint... 8)
cor3huis
Posts: 21
Joined: 15 Jan 2010, 21:24

Re: How can I add "Clone" issue to group action dropdown

Post by cor3huis »

Bumped.. Maybe this issue is to difficult to solve for users of the forum?

I try to help out in the forum wherever I can, and it would be great if someone is knowledgeable enough to give a hint also... TIA
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: How can I add "Clone" issue to group action dropdown

Post by cas »

Cor,

just do what you already suggested :idea: .
1. adjust print_all_bug_action_option_list
2. Copy the "copy" functionality and refer to a bug_clone function.(bug_actiongroup.php)
3. This function again can be copied form bug_copy function (bug_api.php).
4. Now all you need to do is to remove those items you do not want to be copied from the bug_clone function.

Remember that now all the selected issues are copied/cloned to another project. Further maintenance needs to be done by hand.
cor3huis
Posts: 21
Joined: 15 Jan 2010, 21:24

Re: How can I add "Clone" issue to group action dropdown

Post by cor3huis »

Thanks CAS! I will first do what you also suggested, I was just hoping there was a more elegant, e.g. function hooking solution. Will add the solution to this forum item as soon as I have it working well.
Post Reply