Open jonboiser opened 4 years ago
@jonboiser Honestly, I don't know how to manage this because I don't see the problem.
When importing, if you are going to create a new user you need to provide a password. Here you are not providing the password, so it's an error on that field.
The only situation where you can skip the password is when you're updating users, and this is not the case. The error is clearly that you are not providing the password for a non-existing user.
what is your proposal?
So I got that first user CSV by exporting it from Facility A, and I think that's why all the PASSWORD
cells have an anonymized *
password, but that's still a valid password for creating a new user.
The problem I had here is that when I try to import that CSV into a different facility (Facility B), I forgot to remove the UUID
column, which is why I think all of them are getting "skipped". I believe I should have emptied the cells in the UUID
column before importing to Facility B.
So the issue here is a UX one, because the validation error is making me think there is a problem with the PASSWORD
column, when I really think it's a problem with the UUID
column.
:man_shrugging: I still think the problem is in the PASSWORD
column as it's the data the user is missing in the csv. In any case we can agree the problem, in this particular case, is with both columns UUID
& PASSWORD
.
I think the validation is correct, the doubt is deciding on the wording of the error message. If you have a better wording and it can be changed for 0.14 (are strings totally frozen now?) I will be happy to change it. In any case we should try to find some quorum for the changes as these strings have already been checked by several people.
Observed behavior
I exported a CSV from one facility and tried to import it into a new facility (after applying fixes in #7166 ), but would get these validation errors.
My guess is that this might be because I used the CSV with the UUID column filled in. And all the
FacilityUsers
with these IDs belong to a different facility, so the code is assuming I want to do an edit operation instead of a create operation.Expected behavior
The workflow presents a more specific validation error in this situation. I was thrown off by the message focusing on the "Password" field, when it actually was the "UUID" field causing problems.
User-facing consequences
…
Errors and logs
…
Steps to reproduce
…
Context
v0.14.0-beta6