View Issue Details

IDProjectCategoryView StatusLast Update
0034885mantisbtreportspublic2026-08-21 19:27
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Target Version2.29.0Fixed in Version2.29.0 
Summary0034885: Issue trends data should be relative to period start, not current time
Description

Currently, the Issue Trend reports are aggregating data into hourly, daily or weekly buckets, depending on the reporting period's duration.

These buckets are built backwards from the current time, which causes unexpected results as the first set of data can have an associated timestamp set before the selected period's start time.

Buckets should be relative to the period's start time (with the last bucket potentially smaller than the normal size).

TagsNo tags attached.

Relationships

related to 0034879 resolveddregad In Issue Trend graphs, the date is displayed in short format even if data is in hourly buckets 

Activities

dregad

dregad

2025-02-25 20:29

developer   ~0069918

Issue resolved by mistake due to pushing a work-in-progress branch to the mantisbt repository instead of my own fork. Sorry about the noise.

dregad

dregad

2026-07-18 12:36

developer   ~0071305

PR https://github.com/mantisbt/mantisbt/pull/2247

Related Changesets

MantisBT: master 50e5b752

2024-10-22 12:18

dregad


Details Diff
Issue Trends data relative to period start

Until now the Issue Trend reports were aggregating data into hourly,
daily or weekly buckets, depending on the reporting period's duration.

These buckets were built backwards from the current time, which caused
unexpected results as the first set of data can have an associated
timestamp set before the selected period's start time.

Setting the process' start time with the new Period::get_latest_bucket()
method instead of time() causes the buckets to be relative to the
period's start time (with the last bucket potentially smaller than the
normal size).

Fixes 0034885
Affected Issues
0034885
mod - plugins/MantisGraph/core/Period.php Diff File
mod - plugins/MantisGraph/pages/issues_trend_bycategory_table.php Diff File
mod - plugins/MantisGraph/pages/issues_trend_bystatus_table.php Diff File