Closed mahalakshme closed 4 months ago
Issue is due to null name
s provided for user
s (probably via csv upload).
Webapp ui and save already check for null names.
DB level change introduced in 7.1 to make name
not null as part of avniproject/avni-client#1238. Tested to check that this blocks csv uploads with null names from going through.
Thus deploying 7.1 as it is will prevent this issue from happening.
However, the error message while uploading csv with no name column is not very user friendly:
"could not execute statement; SQL [n/a]; constraint [name]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement"
If the name column is included in the csv but value is left blank for a row, the name is set to empty string.
To discuss if any further handling is required:
@NotNull
in User.java
@1t5j0y I think we can do the below things:
Alternatively, communicate to client to set names for users with missing names.
@1t5j0y I discussed with the implementation team and also checked the DB and Glific webconsole, Found the below:
So I suggest to do the below fix now: Do the below on priority:
After the above is done, do the below in 6.x branch to be able to release to RWB: When username is missing in CSV, we show this error message "Invalid username ''. It must be at least 7 characters.". Similarly when 'Full Name of User' column is missing, show a message in CSV stating 'Full Name of User column cannot be empty'
Don't agree with the above course of action.
This is easily fixable by user communication (to provide names for users while uploading csv and to fix users already created for whom names have not been provided) and a data patch (if user welcome messages for these users absolutely do need to be sent out).
The requirement for infrequent releases does not gel well with releasing patch fixes for things that can be fixed by other means.
Moving this back to hold till we discuss this.
I still think the above fixes are needed since it is not the same set of users who upload CSV always. And also since this season RWB is going to scale, it is out of our control to make sure if the needful is communicated to everyone who will be uploading the CSV.
I think we atleast need to do the below: we might need to add a DB trigger to fill the name of the user(from username), everytime it is empty when inserting into DB.
@vinayvenu let us know the way forward on this.
@1t5j0y I talked with the client to understand the importance of patch fix since Vinay was also not sure. He mentioned he will make sure from his side to upload CSVs with name. But from the conversation, I realised below is needed. Can you kindly do the below:
It is also difficult for me to understand the priority since understanding of the priority of this in itself is different across different people within our company. So may be the only solution is to check the client.
Sounds like this can be handled by support or implementation team.
Issue:
https://app.bugsnag.com/samanvay-research-and-development-foundation/rwb/errors/65f418424354650008ddd406?event_id=65f5706800e02d92e0b90000&i=em&m=fq - Issue in RWB environment - 100 events occurred.
Acceptance criteria:
As of 20th March AC: