View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0013265 | mantisbt | change log | public | 2011-08-25 17:50 | 2014-09-23 18:05 |
Reporter | SL-Gundam | Assigned To | dregad | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | PHP 5.3.3 nts | OS | Windows 7 x64 | OS Version | 6.1 (Build 7600) |
Product Version | 1.2.7 | ||||
Target Version | 1.2.12 | Fixed in Version | 1.2.12 | ||
Summary | 0013265: Issues counted more then one time if they have multiple relations | ||||
Description | Below the changes in a particular version are the number of issues fixed in that version, for example: "[78 issues]" This works as it should as long as an issue does not have multiple relations. But if an issue has more then 1 relation then it will be counted by the number of relations it has. I don't know if this was by design but i feel this is wrong as it confuses users who notice the differences in shown vs counted | ||||
Tags | patch | ||||
Attached Files | 0001-Fix-for-13265-Changelog-Issues-counted-more-then-one.patch (1,070 bytes)
From d5cb1b3349c8ddb11471002ef14efaa04a3888b9 Mon Sep 17 00:00:00 2001 From: SL-Gundam <slgundam@gmail.com> Date: Thu, 25 Aug 2011 23:51:43 +0200 Subject: [PATCH] Fix for #13265 - Changelog - Issues counted more then one time if they have multiple relations --- changelog_page.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog_page.php b/changelog_page.php index c5cc348..4e11692 100644 --- a/changelog_page.php +++ b/changelog_page.php @@ -213,8 +213,6 @@ foreach( $t_project_ids as $t_project_id ) { continue; } - $t_issues_resolved++; - if ( 0 === strcasecmp( $t_parent_version, $t_version ) ) { $t_issue_ids[] = $t_issue_id; $t_issue_parents[] = $t_issue_parent; @@ -228,6 +226,8 @@ foreach( $t_project_ids as $t_project_id ) { user_cache_array_rows( array_unique( $t_issue_handlers ) ); + $t_issues_resolved = count( $t_issue_ids ); + if ( $t_issues_resolved > 0 ) { if ( !$t_project_header_printed ) { print_project_header_changelog( $t_project_name ); -- 1.7.6.msysgit.0 | ||||
I added a small patch which seems to fix this problem. I performed several tests on it and could find no further issues But the if statement after the removed "$t_issues_resolved++;" does give me some doubts whether the patch will fix all problems concerning the counting of the issues So please look it over and see what you think |
|
Patch is for the 1.2.x branch |
|
That patch looks like it's better logic to me. Commited to git. |
|
Fix not yet visible in git (checked both the master and 1.2.x branch) |
|
SL-Gundam, I tested your patch but it does not resolve all cases. For example, consider the following bugs
Changelog displays the count as [5 issues] with or without your patch. I think the proper way to fix the problem is to count the unique number of bug_id's, which should be easy enough. I'll upload a fix shortly. While testing I also noticed that the changelog relies on the parent issue's target_version to determine the hierarchy, which I think is not correct. I opened 0014788 to track this. |
|
Fix committed |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master 09fcedf0 2012-10-06 12:22 Details Diff |
Fix 0013265: Issues count in Changelog Prior to this, issues having multiple parents were counted more than once, causing an incorrect count of issues to be reported (changelog displayed the number of printed lines instead of the number of distinct issues in the version) This is an improvement over SL-Gundam's original patch, which did not cover all cases. |
Affected Issues 0013265 |
|
mod - changelog_page.php | Diff File | ||
MantisBT: master-1.2.x 2f47497a 2012-10-06 12:22 Details Diff |
Fix 0013265: Issues count in Changelog Prior to this, issues having multiple parents were counted more than once, causing an incorrect count of issues to be reported (changelog displayed the number of printed lines instead of the number of distinct issues in the version) This is an improvement over SL-Gundam's original patch, which did not cover all cases. |
Affected Issues 0013265 |
|
mod - changelog_page.php | Diff File |