View Issue Details

IDProjectCategoryView StatusLast Update
0037319mantisbtcode cleanuppublic2026-09-03 19:04
Reporterdregad Assigned Todregad  
PrioritynormalSeveritytweakReproducibilityN/A
Status resolvedResolutionfixed 
Target Version2.29.0Fixed in Version2.29.0 
Summary0037319: Duplicated code in MantisGraph plugin's graph_api.php
Description

create_developer_resolved_summary() and create_developer_open_summary() functions are nearly identical, differing only by a condition in the SQL query where clause.

Duplicated code should be factored out.

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

MantisBT: master 0e9e169c

2026-07-20 13:50

dregad


Details Diff
Remove duplicated code in graph_api.php

create_developer_resolved_summary() and create_developer_open_summary()
MantisGraph plugin functions are nearly identical, differing only by
a condition in the SQL query where clause.

This commit combines them into a single one, leveraging DbQuery to
dynamically build the SQL based on the summary type (open/resolved).

Fixes 0037319
Affected Issues
0037319
mod - plugins/MantisGraph/core/graph_api.php Diff File
mod - plugins/MantisGraph/pages/developer_graph.php Diff File