View Issue Details

IDProjectCategoryView StatusLast Update
0027122mantisbtplug-inspublic2020-08-09 08:17
Reporterdregad Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.8.0 
Target Version2.25.0Fixed in Version2.25.0 
Summary0027122: 3rd-party plugins cannot use chart.js library bundled with MantisGraph
Description

When the MantisGraph plugin was modified to rely on chart.js as part of 2.0 release, the library was loaded on every single page.

While not very efficient, this allowed 3rd-party plugins to use the chart.js library to display their own graphs.

From MantisBT 2.8.0, the MantisGraph Plugin only loads chart.js for its own pages (see 0023446), which broke the above-mentioned plugins, as they could no longer access chart.js resources, unless they bundled the library themselves, which is also inefficient and could lead to compatibility conflicts due to version mismatch.

TagsNo tags attached.

Relationships

related to 0023446 closedatrol Unneeded files delivered if Mantis Graphs plugin is enabled 

Activities

dregad

dregad

2020-08-03 12:38

developer   ~0064223

To avoid the problem and restore the ability for 3rd-party plugins to use the same chart.js as the MantisGraph plugin, the latter should provide a way to include the library separately from the plugin's standard resources() function.

Related Changesets

MantisBT: master a1453788

2020-05-25 12:42:31

dregad

Details Diff
MantisGraph: new method to load chart.js resources

Since MantisBT 2.8.0, MantisGraph only loads chart.js for its own pages.

This prevents other plugins from accessing these resources to publish
their own charts, unless they bundle chart.js themselves.

This commit exposes a dedicated public method include_chartjs() to
include the library, separately from the plugin's standard resources()
function.

Fixes 0027122
Affected Issues
0027122
mod - plugins/MantisGraph/MantisGraph.php Diff File

Issue History

Date Modified Username Field Change
2020-08-03 12:35 dregad New Issue
2020-08-03 12:35 dregad Status new => assigned
2020-08-03 12:35 dregad Assigned To => dregad
2020-08-03 12:38 dregad Note Added: 0064223
2020-08-03 12:38 dregad Relationship added related to 0023446
2020-08-03 17:37 dregad Summary MantisGraph only loads chart.js for its own pages => 3rd-party plugins cannot use chart.js library bundled with MantisGraph
2020-08-03 17:37 dregad Description Updated View Revisions
2020-08-09 08:17 dregad Changeset attached => MantisBT master a1453788
2020-08-09 08:17 dregad Status assigned => resolved
2020-08-09 08:17 dregad Resolution open => fixed
2020-08-09 08:17 dregad Fixed in Version => 2.25.0