View Issue Details

IDProjectCategoryView StatusLast Update
0011021mantisbtbugtrackerpublic2010-02-22 14:34
Reporterfrodgers Assigned Todhx  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0rc2 
Target Version1.2.0Fixed in Version1.2.0 
Summary0011021: Bug history does not display new value
Description

If history's new value is zero bug history will only display the old value. Instead of the old => new format.

Additional Information

I've supplied a patch to correct this issue.

Tagspatch
Attached Files
history_api.patch (869 bytes)   
From 98c15f3ea16a9a088c57168c9c8bc1a53587ee86 Mon Sep 17 00:00:00 2001
From: Frank Rodgers <frodgers@redcom.com>
Date: Thu, 8 Oct 2009 08:24:07 -0400
Subject: [PATCH] If a history new value is zero the change was not displayed, just the old value


diff --git a/core/history_api.php b/core/history_api.php
index 2d97e57..044bc47 100644
--- a/core/history_api.php
+++ b/core/history_api.php
@@ -247,7 +247,7 @@ function history_localize_item( $p_field_name, $p_type, $p_old_value, $p_new_val
 
 	if( PLUGIN_HISTORY == $p_type ) {
 		$t_note = lang_get_defaulted( "plugin_$p_field_name", $p_field_name );
-		$t_change = ( $p_new_value ? "$p_old_value => $p_new_value" : $p_old_value );
+		$t_change = ( isset( $p_new_value ) ? "$p_old_value => $p_new_value" : $p_old_value );
 
 		return array( 'note' => $t_note, 'change' => $t_change, 'raw' => true );
 	}
-- 
1.6.0.4

history_api.patch (869 bytes)   

Activities

dhx

dhx

2009-10-27 07:51

reporter   ~0023405

Thanks for the patch. I've committed it to the 1.2.x and 1.3.x branches.

Related Changesets

MantisBT: master-1.2.x fef32201

2009-10-08 08:24

frodgers

Committer: dhx


Details Diff
Fix 0011021: Bug history does not display new null/zero values

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0011021
mod - core/history_api.php Diff File

MantisBT: master 0056967d

2009-10-08 08:24

frodgers

Committer: dhx


Details Diff
Fix 0011021: Bug history does not display new null/zero values

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0011021
mod - core/history_api.php Diff File