Universal Import Users - Update fields only
Hi, this is my very first ever post on GitHub. Loving Snipe-It much! Thank you for your all your kind efforts, it is truly appreciated~~!!!
Attempting to replace current self developed Excel macros for tracking our IT assets.
Expected Behavior (or desired behavior if a feature request)
Love the universal import, but was hoping when I reimport the same user CSV file I used before but this time with updated fields it will:
- Replace fields with current input to empty. Say extension 1234 to blank
- Does not at all touch the user's current password
P/S: Clicked the checkbox to "Update Existing Values?"
Actual Behavior
What I experienced was that:
- I noticed if a field has value like extension 1234, it will not then make it blank if in the import file value is empty.
- It totally did something with the user's password as when I try to login again with the confirmed correct password, it says invalid =(.
Please confirm you have done the following before posting your bug report:
- [X] I have enabled debug mode
- [X] I have read checked the Common Issues page
Provide answers to these questions:
- Is this a fresh install or an upgrade? Totally fresh
- Version of Snipe-IT you're running 4.2.0
- Version of PHP you're running WAMP 7.1.16
- Version of MySQL/MariaDB you're running WAMP 5.7.21
- What OS and web server you're running Snipe-IT on Windows 10
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) install.sh GitHub
- WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
- What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
- If a stacktrace is provided in the error, include that too.
- Any errors that appear in your browser's error console.
- Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.
- Include any additional information you can find in
storage/logsand your webserver's logs. - Include what you've done so far in the installation, and if you got any error messages along the way.
- Indicate whether or not you've manually edited any data directly in the database
Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.
https://snipe-it.readme.io/docs/getting-help
@dmeltzer can you take a look at this when you get a moment?
The first issue is deliberate. The idea is that if you have updates, you can provide a csv with only those columns and data that is not provided will not be touched. I could look into adding an option for working in either way, but the code already has a lot of conditionals and different behavior in different situations and I feel like adding another branch is only going to cause more issues. The second issue does not sound like it's working as intended.. I'll look into it.
@dmeltzer thank you for fixing the #2 issue which is not to do anything with password when updating.
I understand the reason behind way of handling for issue #1, but is it possible to put a checkbox "Replace Current Field Values with Blanks?:" under current "Update Existing Values?:" checkbox?
Nevertheless, thank you so much again for fixing issue #1!