Plugin: CSV Import - Not importing

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
rmeske
Posts: 19
Joined: 17 Feb 2012, 00:27
Location: California
Contact:

Plugin: CSV Import - Not importing

Post by rmeske »

Hello,

I recently setup Mantis 1.3.2 (Schema 209) and installed the CSV Import plugin using the Master branch. I tried importing a sample list of issues from our previous version of Mantis (1.1.8 ) and I get the following messages and no errors reported.

Code: Select all

Importing file, please wait... Done
Processing cross-references for 0 issues... Done
Thinking maybe the columns had changed, I exported an issue using the CSV Export and compared the column names. The names all matched though my import did not have all the columns and one of them was out of order. I modified my file to match the order and that did not solve the problem, I even took the export and changed just the summary and that didn't work. The readme in GitHub does not provide any details on any settings that may need to be done to have this work.

I have verified:
  • 1. I can Report Issues and they show up in the project.
    2. The account I am using is an Administrator account.
Can someone help me get this working/configured properly so that I can move over to the latest version of Mantis.

Best regards,
Ron
rmeske
Posts: 19
Joined: 17 Feb 2012, 00:27
Location: California
Contact:

Re: Plugin: CSV Import - Not importing

Post by rmeske »

Hello, Is there another location to report bugs for this plugin?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Plugin: CSV Import - Not importing

Post by atrol »

https://www.mantisbt.org/bugs
Select project "Plugin - CsvImport"
Please use Search before posting and read the Manual
rmeske
Posts: 19
Joined: 17 Feb 2012, 00:27
Location: California
Contact:

Re: Plugin: CSV Import - Not importing

Post by rmeske »

Apparently I do not have an account to report bugs and when I attempt to create one I do not receive the email.

I found and corrected part of my issue. I had assumed the menu item [Import Issues] was for the CSV Import. However, I discovered that is actually for the XML Import/Export plugin and not the CSV Import. Going back through the directions I have now installed it and have the [Import CSV file] menu item.

I can now get to the CSV Import screen and it shows the first couple of rows of the import file correctly. The columns in my import file are: Reporter,Assigned To,Priority,Summary,Category,Description,Additional Information,Product Version,Platform

However, when I click the Import file button I am getting the following error:

Code: Select all

Database query failed. Error received from database was #1265: Data truncated for column 'date_submitted' at row 1 for the query: INSERT INTO mantis_bug_table
( project_id,reporter_id, handler_id,duplicate_id,
priority,severity, reproducibility,status,
resolution,projection, category_id,date_submitted,
last_updated,eta, bug_text_id,
os, os_build,platform, version,build,
profile_id, summary, view_state, sponsorship_total, sticky, fixed_in_version,
target_version, due_date
)
VALUES
( ?,?,?,?,
?,?,?,?,
?,?,?,?,
?,?,?,?,
?,?,?,?,
?,?,?,?,
?,?,?,?).
I have tried adding the column "date_submitted" to my import file and have tried two formats: mm-dd-yyyy & mm/dd/yyyy. I also tried a null value and still get the error.

Any ideas as to what is causing this issue?

I am using:
MantisBT version 1.3.2
CSV Import 1.4.0

Regards,
Ron
rmeske
Posts: 19
Joined: 17 Feb 2012, 00:27
Location: California
Contact:

Re: Plugin: CSV Import - Not importing

Post by rmeske »

Hello,

Is anyone else using this plugin without issue? I have tried uninstalling and reinstalling without any change.

Regards,
Ron
rmeske
Posts: 19
Joined: 17 Feb 2012, 00:27
Location: California
Contact:

Re: Plugin: CSV Import - Not importing

Post by rmeske »

Hello,

I turned on the display errors and tried the import again. I tried attaching a PDF of the output here but it was not allowed, so I converted to a plain text file which is a little hard to read, but I think you can see all the output.

I am unable to log into the bug reporting system so I am reporting my issue here in hope that someone can help get this corrected.

Regards,
Ron
Attachments
mantis_import_CSV_error.txt
(4.34 KiB) Downloaded 411 times
rmeske
Posts: 19
Joined: 17 Feb 2012, 00:27
Location: California
Contact:

Plugin: CSV Import - Not importing - Any soltuion?

Post by rmeske »

Hello,

I upgraded to Mantis 1.3.4 today and am still encountering the error mentioned in the prior post.

Any suggestions would be appreciated.

Ron
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Plugin: CSV Import - Not importing - Any soltuion?

Post by atrol »

rmeske wrote:I upgraded to Mantis 1.3.4 today and am still encountering the error mentioned in the prior post.
Upgrading Mantis will not help as the problem is caused by the plugin or maybe wrong data in your csv file.
Please use Search before posting and read the Manual
rmeske
Posts: 19
Joined: 17 Feb 2012, 00:27
Location: California
Contact:

Re: Plugin: CSV Import - Not importing

Post by rmeske »

Hello,

I am unable to log in to report the bug. I have tried to recover my password but never receive an email and I am unable to register because it says I already exist.

I have tried a variety of different data for importing but it is always the same error.

Code: Select all

Database query failed. Error received from database was #1265: Data truncated for column 'date_submitted' at row 1 for the query:
I have tried including dates and not including dates with the same resulting error. I reviewed the plugin code and see that in place of date it is assigning todays date but it looks like it is formatted as a string.

Code: Select all

[11] => '2016-12-01 7:41:30',
Could this be causing the error based on the bug report: https://www.mantisbt.org/bugs/view.php?id=21198

Ron
rmeske
Posts: 19
Joined: 17 Feb 2012, 00:27
Location: California
Contact:

Re: Plugin: CSV Import - Not importing - Solved

Post by rmeske »

I have verified that the Plug-in file import_issues.php is the cause of the error. The block of code in particular is for a new bug when setting up the default values.

Code: Select all

		#Default bug will be with default values
		$t_bug_data = new BugData;

		$t_bug_data->project_id			= $g_project_id;
		$t_bug_data->category_id		= get_csv_import_category_id( $g_project_id, 'General' );
		$t_bug_data->reporter_id		= auth_get_current_user_id();
		$t_bug_data->priority			= config_get( 'default_bug_priority' );
		$t_bug_data->severity			= config_get( 'default_bug_severity' );
		$t_bug_data->reproducibility	= config_get( 'default_bug_reproducibility' );
		$t_bug_data->date_submitted	= date('Y-m-d G:i:s');
				$t_bug_data->handler_id			= 0;
		$t_bug_data->status				= config_get( 'bug_submit_status' );
		$t_bug_data->resolution			= OPEN;
		$t_bug_data->view_state			= config_get( 'default_bug_view_status' );
		$t_bug_data->profile_id			= 0;
		$t_bug_data->due_date			= date_get_null();
I modified the line

Code: Select all

$t_bug_data->date_submitted	= date('Y-m-d G:i:s');
to be

Code: Select all

$t_bug_data->date_submitted	= time();
This solved my error.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Plugin: CSV Import - Not importing

Post by atrol »

rmeske wrote:I am unable to log in to report the bug. I have tried to recover my password but never receive an email and I am unable to register because it says I already exist.
I reset your password just now. You should have received email for that.
Please use Search before posting and read the Manual
rmeske
Posts: 19
Joined: 17 Feb 2012, 00:27
Location: California
Contact:

Re: Plugin: CSV Import - Not importing

Post by rmeske »

@atrol, I did not receive the password reset, but did receive the forum notification. Do they both use the same email address to send with?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Plugin: CSV Import - Not importing

Post by atrol »

rmeske wrote:Do they both use the same email address to send with?
Yes they do, but the underlying technology of the bug tracker and forum are different.
Maybe you want to try another email address? If so, tell me the address in a private message and I will change your account.
Please use Search before posting and read the Manual
Post Reply