Hello,
I would like to get the bug_id after submiting an bug in order to use it after to do something
I have do that but I'm not sur that it's working correctly :
$p_issue_id =helper_get_current_project();
$t_bug = bug_get( $p_issue_id );
If someone have another idea I will appreciate his help.
Thank you
Get the bug id after submting bug
Moderators: Developer, Contributor
Re: Get the bug id after submting bug
You have to write a plugin that uses event EVENT_REPORT_BUG https://www.mantisbt.org/docs/master/en ... bug.action
Re: Get the bug id after submting bug
Hello Atrol,
Thank you for response
But The EVENT_REPORT_BUG take in parameters Bug data structure and Bug id and he retrun nothing. And I want to get the bug ID.
I need to get the bug ID in order to use it in custom_function_api.php (in a override fonction).
Thank you for response
But The EVENT_REPORT_BUG take in parameters Bug data structure and Bug id and he retrun nothing. And I want to get the bug ID.
I need to get the bug ID in order to use it in custom_function_api.php (in a override fonction).
Re: Get the bug id after submting bug
EVENT_REPORT_BUG is not a function, it's an event where you can subscribe to with your own function.
Your own function is called with the bug id as 2nd parameter
From provided documentation link
I am talking about plugins, not custom functions.At this point, the issue ID is actually known, and is passed as a second parameter.
If you want to use a custom function, you have to write custom_function_override_issue_create_notify which is called with issue id as parameter
https://www.mantisbt.org/docs/master/en ... cs.defined
Keep in mind that custom functions are easier to implement than plugins, but they are limited in terms of functionality and might be removed in Mantis in a later version (not anncounced yet).