View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012814 | mantisbt | plug-ins | public | 2011-02-24 13:35 | 2013-08-16 06:33 |
Reporter | zrybola | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | new | Resolution | open | ||
Product Version | 1.2.4 | ||||
Summary | 0012814: EVENT_BUG_CHANGE_STATUS_FORM and EVENT_UPDATE_BUG_DATA events undefined | ||||
Description | Hello, I found a documentation to develop a plug-in with information about events (http://docs.mantisbt.org/master/en/developers.pdf). I found event EVENT_BUG_CHANGE_STATUS_FORM and EVENT_UPDATE_BUG_DATA in the documentation which seem to fit my need. Unfortunately, when I try to hook them in my plug-in, it is said these events "have not yet been declared". I made some research of the source code and there is really no event signalization for such events. I want to ask, why are these events mentioned in the documentation but not signaled in the real application code. How can I hook my plug-in to modify bug data while updating? Should I update the core code to include custom event signalization? What about later updates of mantis core - I would lose my changes. Thanks for your answer and advice. | ||||
Tags | No tags attached. | ||||
The documentation of the plugin functionality is not up to date, there is an event called "EVENT_UPDATE_BUG" inside bug_update.php which may be usefull for you. |
|
Thanks for your help. I got confused about the event references. There are several version on different sites available. |
|
Now I came across another situation. I searched the source code of page bug_change_status_page.php for signaled events but there is only EVENT_BUGNOTE_ADD_FORM event signaled which is definitely not the one I need. I have another function hooked to EVENT_UPDATE_BUG to process the status change but this needs the custom field filled in. What should I do? How can I add an input for a custom field in the change status form? Do I need to edit the core code and add a new signal there? How can I upgrade Mantis to higher version with such changes made in core code? Thanks a lot for your suggestions. |
|
If you need an event, you can add one in the core code, make sure also to update events_inc.php (for defining the event) . Be aware that updates will take away these changes. |
|
I was afraid of this. I will have to add an event and make some reminder to add the event again after any Mantis core update. Thanks. |
|
The problem has been solved by editing the core code and adding several new events hooked in a plugin. I suggest closing this ticket. Thank you, cas, for your advice. |
|
Assuming you eventually want your plugin to become public (mantisbt-plugins github repo), I suggest you post a git patch of core changes you made, so we can evaluate whether it can be included in a future release |
|