This is my first post to these Forums. I'm trying to sort out my understanding of various aspects of the MantisBT code, so here are a couple of questions to start with:
1. On the relationship between "custom functions" and "plugins": I'm unable to find a single piece of documentation that discusses both of these -- so it's not clear to me whether plugins are a newer, more general way of doing what custom functions do (and more), or if the two features occupy fundamentally different niches in the MantisBT ecosystem.
Are plugins considered preferable to custom functions to achieve a customization (such as validating a new bug or a bug update before allowing it to be written to the database)? Or are there things that custom functions can do that plugins cannot do?
2. On the relationship between the SOAP API and custom functions (and specifically the validation functions): can anyone explain why the "issue_create_notify" custom function (for example) is called from bug_report.php but not from mc_issue_add()?
I'm aware that operations performed through the SOAP API don't cause plugin events to be generated (see: https://www.mantisbt.org/bugs/view.php?id=13498, etc.), and I think I understand the comments by @atrol in that bug, and by @cproensa in https://www.mantisbt.org/bugs/view.php?id=11993, about why enabling those events for operations not initiated from the HTML UI could be problematic.
But it doesn't seem like those considerations would apply to the custom validation functions, which either allow the creation (or update or delete) to go forward, or call trigger_error() to prevent it going forward. I don't think that a call to trigger_error() should be a problem for the SOAP API -- since the first thing the SOAP API does is call set_error_handler() -- but maybe there's some other reason?
(More questions to come, no doubt, but I will stop here and await answers to these two before asking more.
Thanks!