Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export function in web ui prepends a whitespace for some fields #10344

Closed
2 tasks done
leitwerk-ag opened this issue Nov 22, 2021 · 1 comment · Fixed by #10345
Closed
2 tasks done

Export function in web ui prepends a whitespace for some fields #10344

leitwerk-ag opened this issue Nov 22, 2021 · 1 comment · Fixed by #10345

Comments

@leitwerk-ag
Copy link
Contributor

Debug mode

Describe the bug

using the "export data" button in Snipe-IT asset view, I get a prepended single whitespace (" ") in some of the data fields.
These fields do not have a leading whitespace (checked in web ui and mysql database)

Reproduction steps

  1. login to snipe-it
  2. select "assets"
  3. select "export data" button
  4. download file (csv, txt, json) (it's correct in .xls, .doc, .pdf; it's broken differently in XML - see below...)
  5. view file and see that some fields are prepended with a " " character (eg " laptop")

Expected behavior

no prepended " " character (eg "laptop")

Screenshots

No response

Snipe-IT Version

5.3.2

Operating System

Debian Buster (10)

Web Server

apache

PHP Version

7.4

Operating System

macOS

Browser

Safari, Chromium

Version

Safari 15.1; Chromium 95.0.4638.69

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

the install has been living (and updated) for a while (a few months)
we do make extensive use of custom fields

We've just noticed this:
excerpt from XML export:

<row id="3">
  <column-1>
    appdyn.example.de</column-1>
  <column-2>
    2701</column-2>
  <column-3>Linux</column-3>

same excerpt as CSV export:

" appdyn.example.com"," 2701","Linux"

and JSON:

"Asset Name": " appdyn.example.de",
"Asset Tag": " 2701",
"Modell": "Linux",

So - a blind bet would be to give the text based formatter a closer look.

@leitwerk-ag
Copy link
Contributor Author

seems to be related to: #9135

leitwerk-ag added a commit to leitwerk-ag/snipe-it that referenced this issue Nov 22, 2021
snipe added a commit that referenced this issue Nov 25, 2021
Fixed #10344 and #9135: don't prepand fields with a whitespace in text based export formats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant