CSV Separator unconfigurable ?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
pj118
Posts: 7
Joined: 01 Dec 2010, 08:18

CSV Separator unconfigurable ?

Post by pj118 »

Hi,

I can't change the CSV separator with Mantis 1.2.3. I try to edit config_default-inc.php ($g_csv_separator = ';';).
But it does'nt work.

Thanks for your help.
atrol
Site Admin
Posts: 8571
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: CSV Separator unconfigurable ?

Post by atrol »

You should never change file config_defaults_inc.php because this file will be overwritten when upgrading to newer versions of MantisBT
All customization should be done in file config_inc.php (just copy lines from config_defaults_inc.php to this file and adjust to your needs)

I am not able to reproduce your problem.
Setting $g_csv_separator works fine

You have to provide more details than just "it does'nt work"
Please use Search before posting and read the Manual
pj118
Posts: 7
Joined: 01 Dec 2010, 08:18

Re: CSV Separator unconfigurable ?

Post by pj118 »

Thanks for your answer.

In the first time, we edited the config_default_inc.php and we set $g_csv_separator=";".
When we export a csv, the caractar separator is still ",".

In the second time we reset the file config_default_inc.php and as you say, we have just add the variable in the config_inc.php.
When we export a csv, the caractar separator is still ",".

Excuse my english. Thanks for your further answers.
atrol
Site Admin
Posts: 8571
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: CSV Separator unconfigurable ?

Post by atrol »

Which operating system, PHP, database, webserver do you use?
Did you change any of the files which are delivered with MantisBT?
Did you install any plugins?
Please use Search before posting and read the Manual
pj118
Posts: 7
Joined: 01 Dec 2010, 08:18

Re: CSV Separator unconfigurable ?

Post by pj118 »

OS : redhat 5
PHP : 5.3.3
Database : Mysql 5.0.77
Webserver : Apache

We don't add plugins (show the attachement).
We just edit the config_inc.php file as :

Code: Select all

<?php
        $g_hostname = 'localhost';
        $g_db_type = 'mysql';
        $g_database_name = 'bugtracker';
        $g_db_username = 'mantdsem';
        $g_db_password = 'mantpass';

        $g_csv_separator = ';';
        $g_status_enum_string = '00:propose,10:new,20:acknowledged,25:feedback,30:assigned,40:correct,50:livre,60:evolution,65:refused,75:resolved,90:closed';
        $g_status_colors        = array( 'propose'              => '#FFA0A0', # rose
                                                                 'new'                  => '#FF80A8', # rouge
                                                                 'acknowledged' => '#FF9933', # orange
                                                                 'feedback'             => '#FFCC00', # orange clair
                                                                 'assigned'             => '#FFFFB0', # jaune
                                                                 'correct'              => '#C8C8FF', # lilas
                                                                 'livre'                => '#CCEEDD', # vert clair
                                                                 'resolved'             => '#84CAC9', # vert fonce
                                                                 'evolution'    => '#D0D0D0', # gris refused
                                                                 'refused'              => '#E8E8E8', # gris clair
                                                                 'closed'               => '#FFFFFF');# blanc
?>
Attachments
plugins
plugins
up.JPG (66.3 KiB) Viewed 8656 times
atrol
Site Admin
Posts: 8571
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: CSV Separator unconfigurable ?

Post by atrol »

To be sure that we are talking about the same thing.
Signaup and try on my testinstallation
http://62.75.242.233/mantisbt-1.2.3
Is this the result that you expect?
Please use Search before posting and read the Manual
pj118
Posts: 7
Joined: 01 Dec 2010, 08:18

Re: CSV Separator unconfigurable ?

Post by pj118 »

Yes.
It's that we want.
atrol
Site Admin
Posts: 8571
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: CSV Separator unconfigurable ?

Post by atrol »

Make a backup copy of file csv_export.php

After line 42 of csv_export.php (should be something like $t_sep = csv_get_separator();)
add the following line

Code: Select all

var_dump ($t_sep); die ("Hello CSV");
Start the csv export and see what happens
Please use Search before posting and read the Manual
pj118
Posts: 7
Joined: 01 Dec 2010, 08:18

Re: CSV Separator unconfigurable ?

Post by pj118 »

We have the same result : a file with the ",".
The "die" don't stop the csv export.
atrol
Site Admin
Posts: 8571
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: CSV Separator unconfigurable ?

Post by atrol »

Seems that you are not changing the source code of the application you are running.
Maybe you are working in wrong directory or on wrong server?
Please use Search before posting and read the Manual
pj118
Posts: 7
Joined: 01 Dec 2010, 08:18

Re: CSV Separator unconfigurable ?

Post by pj118 »

Hi Atrol,

thanks for the clue, the problem came from the system and not from Mantis !

We're don't manage the server and the administrators installed a cache system in the server while we were setting up the configuration and we weren't noticed !

So in order to apply changes, we now need to restart the httpd service.

Thanks for your fast answers and your efficiency !
atrol
Site Admin
Posts: 8571
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: CSV Separator unconfigurable ?

Post by atrol »

Thanks for coming back and telling the solution
Please use Search before posting and read the Manual
Post Reply