Topic: CSV Import ?

Hi,

Am I correct in understanding that Tracmor currently cannot import data via a CSV file ?

I notice this post from Sept 2008, http://www.tracmor.com/forum/viewtopic.php?id=37, that CSV support is planned to be added.  Could someone please advise on the current status of this ?  Perhaps there have been changes in the dev (i.e. SVN) branch ?  (I haven't yet had a look at the commits - I am just playing around with the packaged release and viewing the professional looking tutorials at this stage.)

I also haven't had a chance yet to look at the DB structure.  If a CSV import is not available, I was thinking of looking at a diff between successive mysqldump commands (i.e. before/after a new asset is added) in a bid to obtain a solution that can facilitate a bulk import.

Alternatively, I suppose that the safest way to do this would be to clone one generic item many times (in our case hundreds! yikes), dump out the DB using mysqldump, edit the file somehow (hopefully being able to append a unique identifier to each "placeholder" field of my cloned item to facilitate search/replace) and import again.

Thank you for your time.

Regards,

Patrick

Last edited by prynhart (2009-04-24 00:32:37)

Re: CSV Import ?

Hi Patrick,

You are correct that CSV import is not in Tracmor yet.  Since the post you referenced was made,  it has moved closer to the top of our priority list.  But for now importing is a manual process.  When we do begin work on the import feature,  I will post an update to this thread.

Justin Sinclair

Got Inventory? Get Tracmor.

Re: CSV Import ?

Dear Justin,

Thank you for your reply.

I have managed to come up with a workaround that allows a bulk asset import using "iMacros extension for Firefox" (https://addons.mozilla.org/en-US/firefox/addon/3863).  In my experience, this method is robust with Tracmor because iMacros has a command "REFRESH" which forces the extension to wait on busy Ajax operation(s).  This means that the usual kludges associated with scripting macros (e.g. "pause for X seconds") are not required.

A proof of concept iMacro script, which can be run after a user authenticates at the login box (with appropriate rights), and which adds two assets, is posted below.  The regions highlighted in bold are fields that could change as the result of an import.  (Note that this is only a minimal example.)

Using Unix tools such as awk it would be fairly easy to construct the necessary blocks of iMacros code from a CSV file.

Note that the macro was originally recorded for one item and then edited as required.  I added the REFRESH lines (otherwise AJAX errors would occur) and a copy/paste + edit for a second item.

In practise, prior to an import using this method, you would need to set Tracmor up with required custom fields as the ATTR ID's could otherwise change.

Regards,

Patrick

-----

VERSION BUILD=6210326 RECORDER=FX
TAB T=1

URL GOTO=http://mywebserverURL/tracmor/assets/asset_list.php
REFRESH
TAG POS=1 TYPE=A ATTR=TXT:Create<SP>Asset
REFRESH
TAG POS=1 TYPE=SELECT FORM=ACTION:http://mywebserverURL/tracmor/assets/asset_edit.php ATTR=ID:c19 CONTENT=%1
REFRESH
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://mywebserverURL/tracmor/assets/asset_edit.php ATTR=ID:c18 CONTENT=IM0001
REFRESH
TAG POS=1 TYPE=SELECT FORM=ACTION:http://mywebserverURL/tracmor/assets/asset_edit.php ATTR=ID:c42 CONTENT=%2
REFRESH
TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:AssetEditForm ATTR=ID:c24
REFRESH

URL GOTO=http://mywebserverURL/tracmor/assets/asset_list.php
REFRESH
TAG POS=1 TYPE=A ATTR=TXT:Create<SP>Asset
REFRESH
TAG POS=1 TYPE=SELECT FORM=ACTION:http://mywebserverURL/tracmor/assets/asset_edit.php ATTR=ID:c19 CONTENT=%1
REFRESH
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://mywebserverURL/tracmor/assets/asset_edit.php ATTR=ID:c18 CONTENT=IM0002
REFRESH
TAG POS=1 TYPE=SELECT FORM=ACTION:http://mywebserverURL/tracmor/assets/asset_edit.php ATTR=ID:c42 CONTENT=%2
REFRESH
TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:AssetEditForm ATTR=ID:c24
REFRESH

Last edited by prynhart (2009-04-24 18:06:09)

Re: CSV Import ?

Dear Justin

We are in the process of implementing Tracmor to track our test equipment.  I was just wondering what the progress was on CSV import.

Regards,

Mark

Re: CSV Import ?

The CSV Import feature is in progress now, and about 50% complete. We expect to have the final code checked in and merged in svn trunk early next month.

Justin Sinclair

Got Inventory? Get Tracmor.

Re: CSV Import ?

Hello, just wondering if CSV import is working is currently available or not?  Thanks.

Re: CSV Import ?

This feature is about 95% complete right now. We will be testing next week, and if all goes smoothly also merging it into the trunk.

-- Hunter

Re: CSV Import ?

What's news on CSV import?

Mark

Re: CSV Import ?

SiemensHC wrote:

What's news on CSV import?

Mark

Also wondering if there might be an update on the ability to import data. As many others may agree, I'm sure this is going to be a valuable tool.