View Issue Details

IDProjectCategoryView StatusLast Update
0009888mantisbtbugtrackerpublic2009-04-20 09:49
Reportertmatijas Assigned Tojreese  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformIntel x86OSWindowsOS VersionVista
Product Version1.1.4 
Fixed in Version1.1.7 
Summary0009888: Issue History Problem... build, os, os_version, and platform are not looking right and are not effected by language files.
Description

At bottom of bug view page in history section, look at the collumn called "feild". Notice that build, os, os_version, and platform dont look right... they are lower case and os_version has an underscore. They never change no matter what laguage you use. I think there is missing commnads that tells mantis to reference the language file for those items.

This should be very easy fix for the mantis team who developed this software.

P.S. Same thing happens with that email you get when history changes. Also, in that email, there is NO spaces between colums and it looks way messed up - becomes sort of unreadable.. Just notice how no spaces between time, username, feild (change is ok) Example:

LOOKS LIKE THIS:
Date Modified Username Field Change
11-24-08 12:06 PMTommyos_version => Vista

SHOULD LOOK LIKE THIS:
Date Modified Username Field Change
11-24-08 12:06 PM Tommy OS Version => Vista

Steps To Reproduce

Make a test ticket.. change to any language or just make changes to the english language file then make changes to build, os, os_version, and platform and you will see that build, os, os_version, and platform never change. Then look at the email you get when history changes.. You will not only see that stuff like "os_version" does not look right, but you will also see that the columns in the histry portion of the email has no spaces and is hard to read.

TagsNo tags attached.

Activities

tmatijas

tmatijas

2008-11-25 03:34

reporter   ~0020017

FORGOT TO ADD THIS.. Here is a clear exaple of os, os_build, platform and build not looking right in history section.. Notice the underscores and that they are lower case. I have the problem in my production 1.14 build BUT this was taken from the 1.2.0a2 build that i use for testing. Problem persists into version 1.2.. Its gotta be a simple fix... I am working on it but my PHP skill suck.

2008-11-25 02:28 administrator New Issue
2008-11-25 02:28 administrator Status new => assigned
2008-11-25 02:28 administrator Assigned To => administrator
2008-11-25 02:29 administrator Note Added: 0000001
2008-11-25 02:29 administrator os Test os => Test os2
2008-11-25 02:29 administrator os_build Test os version => Test os version2
2008-11-25 02:29 administrator platform Test Platform => Test Platform2
2008-11-25 02:29 administrator build Test product build => Test product build2
2008-11-25 02:29 administrator Summary Test Summary => Test Summary2
2008-11-25 02:29 administrator Description Updated
2008-11-25 02:29 administrator Additional Information Updated

tmatijas

tmatijas

2008-11-25 12:11

reporter   ~0020037

UPDATE.

Well - working on finding solution. No luck yet. Like I said, my php skills somewhat suck. But I would a way to take these items out of history for those who really dont like this annoyance. Just goto bug_api.php in /core directory and comment out the following lines:

history_log_event_direct( $p_bug_id, 'os', $t_old_data->os, $p_bug_data->os );

history_log_event_direct( $p_bug_id, 'os_build', $t_old_data->os_build, $p_bug_data->os_build );

history_log_event_direct( $p_bug_id, 'platform', $t_old_data->platform, $p_bug_data->platform );

history_log_event_direct( $p_bug_id, 'build', $t_old_data->build, $p_bug_data->build );

I suspect this problem also effects version, fixed_in_version, and taget_version but I cannot confirm this.

tmatijas

tmatijas

2008-11-25 12:42

reporter   ~0020038

Oh yeah - forgot to mention.. I made a WORKAROUND to this problem that works but something is still wrong with the logic somewhere because it is NOT pulling values from language file. Still, you can MANUALLY change the values in the 4 lines above. Just change the value between the ''... Example:

BEFORE:
history_log_event_direct( $p_bug_id, 'os_build', $t_old_data->os_build, $p_bug_data->os_build );

AFTER:

history_log_event_direct( $p_bug_id, 'OS BUILD', $t_old_data->os_build, $p_bug_data->os_build );

Although this fixes formatting issues with being able to get rid of underscrores, it does nothing for language control OR messed up email format when you get alert.

tmatijas

tmatijas

2008-11-25 15:18

reporter   ~0020042

2 more work arounds for the issue that effects how the email looks in terms of padding between columns which is the second part of this bug report.. Both work arounds SUCK but it is all I have.

  1. In the global config_inc.php just add a space to your normal date and time format. Example is... $g_normal_date_format = 'm-d-y h:i A '; ... Notice how there is a space after the letter A. This will fix spacing between column 1 (Date Modified) from column 2 (Username).

  2. Add a space to the users name under user managment. If your devlopers name is "Mike Jones" just put space at end and make it "Mike Jones " This will fix space between column 2 (Username) and column 3 (Feild).

This workaround is what it is. Really crappy but it does work. If anyone would like to contribute it would be appreciated.

tmatijas

tmatijas

2008-11-25 15:25

reporter   ~0020044

I think the problem is this.. The top half is controlled in global config file by the following:

$g_email_separator1     = str_pad('', 70, '=');
$g_email_separator2     = str_pad('', 70, '-');
$g_email_padding_length = 28;

When you change lets say g_email_padding_length to something higher like 60 it spreads the collumn of the TOP half of the email but does NOT effect history items.

Email padding seems to be missing entirely for the code that adds the history onto the email.

tmatijas

tmatijas

2008-11-28 00:27

reporter   ~0020087

HAPPY THANKSGIVING!

Found a way to make changes to the column size and made it global.. looks GREAT now.

Add to config_inc.php or config_defaults_inc.php:

--- email separator and padding ------------

$g_email_separator1 = str_pad('', 70, '=');
$g_email_separator2 = str_pad('', 70, '-');
$g_email_padding_length = 28;

DEFINE EMAIL COLUMN WIDTH FOR BUG HISTORY

define( 'column1_bug_history_size', '19' ); # column 1 - Date Modified
define( 'column2_bug_history_size', '25' ); # column 1 - Username
define( 'column3_bug_history_size', '25' ); # column 1 - Field
define( 'column4_bug_history_size', '30' ); # column 1 - Change

NOW REPLACE THE COMMENTED OUT LINES WITH THE ONES I HAVE PROVIDED IN email_api.php near line 1107 depending on yout build of mantis

#$t_message .= str_pad( lang_get( 'date_modified' ), 17 ) .
str_pad( lang_get( 'username' ), 15 ) .
str_pad( lang_get( 'field' ), 25 ) .
str_pad( lang_get( 'change' ), 20 ). " \n";

$t_message .= str_pad( lang_get( 'date_modified' ), column1_bug_history_size ) .
str_pad( lang_get( 'username' ), column2_bug_history_size ) .
str_pad( lang_get( 'field' ), column3_bug_history_size ) .
str_pad( lang_get( 'change' ), column4_bug_history_size ). " \n";

DO THE SAME AGAIN ABOUT 20 LINES BELOW THAT

SLAV EDIT - ADDING SPACE TO HISTORY - OLD VALUES ARE NEXT 4 LINES.. NEW IS 4 AFTER THAT

#$t_message .= str_pad( date( $t_normal_date_format, $t_raw_history_item['date'] ), 17 ) .
str_pad( $t_raw_history_item['username'], 15 ) .
str_pad( $t_localized_item['note'], 25 ) .
str_pad( $t_localized_item['change'], 20 ) . "\n";

$t_message .= str_pad( date( $t_normal_date_format, $t_raw_history_item['date'] ), column1_bug_history_size ) .
str_pad( $t_raw_history_item['username'], column2_bug_history_size ) .
str_pad( $t_localized_item['note'], column3_bug_history_size ) .
str_pad( $t_localized_item['change'], column4_bug_history_size ) . "\n";
My php skills are primative.. if anyone knows a better way other than defining a value in the global config file, please let me know. Thanks, Tom

tmatijas

tmatijas

2008-11-28 00:30

reporter   ~0020088

Sorry - messed up the commenting.. just remember

17 becomes column1_bug_history_size
15 becomes column2_bug_history_size
25 becomes column3_bug_history_size
20 becomes column4_bug_history_size

column 1, 2, 3, and 4 are defined in config file.

grangeway

grangeway

2008-12-06 11:56

reporter   ~0020264

Fixed the localisation issue with http://git.mantisbt.org/?p=mantisbt.git;a=blobdiff;f=core/history_api.php;h=28ac2e4e43d74bd44dedb377ca3e076a93e0b6da;hp=0f046617ebcb0e50094df9957a9fe881b72ab05b;hb=221bda0a2cf510591f532c9f8fb4c84f3bd9562f;hpb=3c4dd162c6a1d7f2b5a7ea22907fc5f7468a7538

Paul

jreese

jreese

2008-12-09 14:06

reporter   ~0020312

Fix has been ported to 1.1.6 development tree.

schoenfeld

schoenfeld

2008-12-10 03:51

reporter   ~0020314

I just tried to reproduce the bug while testing for Debian and noticed that the bug still persists (partly):

2008-12-10 09:45 administrator Neues Problem
2008-12-10 09:49 administrator Betriebssystem => Linux
2008-12-10 09:49 administrator os_build => 1.0
2008-12-10 09:49 administrator Rechnertyp => Test
2008-12-10 09:49 administrator version => Abstimmer V1.10

As you can see the "os_build" field is still not properly replaced.

jreese

jreese

2008-12-11 10:30

reporter   ~0020341

Fix committed to 1.1.7 development tree. I apologize for incorrectly porting Paul's commit.

Related Changesets

MantisBT: master 221bda0a

2008-12-06 11:53

Paul Richards


Details Diff
Fix 0009888: Issue History Problem... build, os, os_version, and platform are not looking right and are not effected by language files. Affected Issues
0009888
mod - core/history_api.php Diff File

MantisBT: master-1.1.x 525dc9a4

2008-12-06 11:53

Paul Richards


Details Diff
Fix 0009888: Issue History Problem... build, os, os_version, and platform are not looking right and are not effected by language files.

<span class="signoff">Signed-off-by: John Reese <jreese@leetcode.net></span>
Affected Issues
0009888
mod - core/history_api.php Diff File

MantisBT: master-1.1.x d80b3fb7

2008-12-10 11:41

jreese


Details Diff
Fix 0009888: typo mistake when porting 221bda0a to 1.1.x. Affected Issues
0009888
mod - core/history_api.php Diff File