DumbAssets icon indicating copy to clipboard operation
DumbAssets copied to clipboard

Support multi-line csv fields (import)

Open pmrocha26 opened this issue 1 year ago • 8 comments

I was trying the import functionality (from homebox), and it failed because the file has at least one multi-line field. The field is properly enclosed in double-quotes. Checked the import code, and it is a bit naive :) Though the format is pretty simple and easy to get started with, full support does require some effort, which may not be worth it - particularly if a mature library already exists (not a js developer though...)

Being able to map the columns directly in the ui is a great idea! I hope adding some pre-made selection templates is in the pipeline...

Minor issues aside, I am quite enjoying using this.

pmrocha26 avatar Jun 13 '25 11:06 pmrocha26

We'll take a look! Out of curiosity what field was it?

abiteman avatar Jun 13 '25 11:06 abiteman

And implementing a smoother import process from snipe_it and homebox is on our punch list :)

abiteman avatar Jun 13 '25 11:06 abiteman

Great, on both counts :) The field was "HB.description", but "HB.notes" and "HB.warranty_details" can also have multiple lines... Thanks

pmrocha26 avatar Jun 13 '25 13:06 pmrocha26

Great thanks!

abiteman avatar Jun 13 '25 14:06 abiteman

we'll address these together! https://github.com/DumbWareio/DumbAssets/issues/78

gitmotion avatar Jun 13 '25 14:06 gitmotion

This should be addressed in #91

abiteman avatar Jun 14 '25 03:06 abiteman

Just made a quick test, and it worked... Issues:

  • some of the dates are off by a day... Had a quick look at the code and I appears to be the conversion to/from excel date. I added cellDates: true to the XLSX.read() and value.toISOString() in the parseExcelDate() function - seems to have fixed it...
  • "hb.warranty_details" - I can understand making "hb.description" and "hb.notes" aliases for the notes field, but "hb.warranty_details"? Shouldn't it map to the warranty field?

pmrocha26 avatar Jun 16 '25 18:06 pmrocha26

We'll look at the date conversion, thanks for the troubleshoot!

Warranty details... probably? Our comparable field is "warranty scope" which we take as "parts only" "limited" etc as opposed to a potential multi line description. BUT we could reevaluate that

abiteman avatar Jun 16 '25 19:06 abiteman