Hi.
I couldn't find much helpful information in the forum nor on the internet itself about modification/creation of buttons in mantis.
I'm not necessarily a noob regarding coding, however I'm not very familiar with php.
Requirements:
I would like to have a button (similar to "Clone" button) on each issue (bug view page), which then creates a new issue as a "child of" from the current one with empty fields in one click.
The button should be named "Create CAPA from this issue".
(CAPA means: Corrective Action / Preventive Action)
Why I don't like to use the CLONE-Button: Because it doesn't pre-set the relationship: I need to set it first to "child of". And it copies all the issue fields content, so I need to delete the content of each field first before I can add new content. This is just quite a lot of repeatable (and therefore unnecessary) effort.
Optional:
- Set the issue-category of the child to a defined category.
- Visible depending on permission level (very low priority )
Possible ideas for the solutions:
- Create my own button (seems to be a bit overexcited regarding my personal coding skills)
- Modify "Clone" button (for this I will need your help: Where to find the code for this button)
- You have other great ideas...
Create new button
Moderators: Developer, Contributor
Re: Create new button
Almost there.
After doing the whole morning some research in mantisbt code, I think, option 2 will be the easiest option.
Modifying Label: set new caption in config/custom_strings_inc.php: $s_create_child_bug_button = 'CAPA'
Changing default relationship value in config/config_inc.php: $g_default_bug_relationship_clone = BUG_BLOCKS
Still not solved:
- Deleting all fields
Optional:
- Set the issue-category of the child to a defined category.
- Visible depending on permission level (very low priority )
After doing the whole morning some research in mantisbt code, I think, option 2 will be the easiest option.
Modifying Label: set new caption in config/custom_strings_inc.php: $s_create_child_bug_button = 'CAPA'
Changing default relationship value in config/config_inc.php: $g_default_bug_relationship_clone = BUG_BLOCKS
Still not solved:
- Deleting all fields
Optional:
- Set the issue-category of the child to a defined category.
- Visible depending on permission level (very low priority )