View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033520 | mantisbt | plug-ins | public | 2024-01-18 04:42 | 2024-03-27 20:14 |
Reporter | cas | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 2.25.2 | ||||
Summary | 0033520: Cannot add option to MantisGraph | ||||
Description | I cannot add option to the graphics tab MantisGraph. Apparently one can add items there using the EVENT_MANTISGRAPH_SUBMENU event. | ||||
Steps To Reproduce | Add this hook to a plugin : Add function extension to the same plugin as: | ||||
Tags | No tags attached. | ||||
@cas please have a look at 0026139:0062802 where I included a sample plugin that I used to test the hook when I introduced the new EVENT_MANTISGRAPH_SUBMENU event. I tried to copy/paste your return value in my test plugin and the button shows. |
|
cas, You did not provide feedback; I am therefore resolving this issue as "no change required". Feel free to reopen the issue at a later time and provide information how to reproduce. |
|
@dregad, the solution as demonstrated through the TestSummarySubmenu plugin indeed works nicely. However graphs are not shown in the added page. I hae adjusted a sample page2.php which should show the category graphs. Is this a bug or should other settings be defined? |
|
The mentioned sample page for my previous comment. |
|
For charts to be displayed, 2 things need to be done:
In the MantisGraph plugin, this is handled by the resource() method, calling the include_chartjs() function for (1), and the Now whether this not working for your child plugin should be considered a bug or not is debatable. I believe that a plugin hooking EVENT_MANTISGRAPH_SUBMENU to show additional graphs may want to use some other chart library to do its work, in which case it would not make sense to forcefully and systematically include chart.js and in this case it would be better to let the plugin decide what to do. I agree this could be better documented; I'm not sure where to put that though. Maybe in the PHPDoc for MantisGraph's events(), unless you have a better idea ? See proposed doc below, suggestions for improving this text are welcome. |
|
Clear answer. As for the doc proposed, to me that is clear enough and indeed would add it in the sectionof the mantisGraph events. issue can be clsed again. |
|