bcgov / cthub

Apache License 2.0
2 stars 5 forks source link

CTHUB - Data Upload Error and Warning Notification BACKEND #365

Open emi-hi opened 4 months ago

emi-hi commented 4 months ago

Title: Data Upload Error and Warning Notification

Description: When uploading data, a pop-up will display the number of errors and warnings. All errors must be fixed before proceeding with the upload, while warnings are optional and can be reviewed by the user to decide whether to proceed. Both errors and warnings will be listed, showing specific column and row issues. If only warnings are present, the user can view the list and choose whether to continue with the upload.

Wireframe: [Insert Wireframe Link Here]https://www.figma.com/design/K7gNHRnlYuG27w8XGVquY5/Warnings%2FErrors?node-id=0-1&t=ahNSzQ6AP3ezAoZi-1 [Insert Prototype Link Here]https://www.figma.com/proto/K7gNHRnlYuG27w8XGVquY5/Warnings%2FErrors?node-id=1-66&t=haXC8FQ7dCXd8Kcs-1&scaling=scale-down-width&content-scaling=fixed&page-id=0%3A1&starting-point-node-id=1%3A66

Purpose and benefit to user: This feature guarantees data integrity by requiring users to address all errors before uploading, reducing potential issues with data accuracy and data analytics. The option to review warnings provides flexibility, allowing users to determine whether the information is needed or not..

Acceptance Criteria: Given I am a user uploading a spreadsheet with errors/warnings, the backend response contains the total errors/warnings counts and all the errors/warnings broken down by column

{Column: Name, Error Type: “x not formatted correctly ”, Expected Format: “213-1234-1231”,
Rows: [1,2,3], Severity: Error , Warning
}

Lalita-Lala commented 3 months ago

I wanted to share a few observations from the recent test, along with some suggestions for improvement. The work overall is excellent, and these are just a few adjustments to consider:

  1. The exclamation mark icon in the circle (or the icon displayed in the pop-up window and main error and warning blocks) should be properly formatted as an exclamation mark.
  2. The error and warning blocks should use “Errors” and “Warnings” in plural form.
  3. When there are multiple errors in a single column, each Error Name should be preceded by a number (e.g., (1), (2)).
  4. The errors are listed in the correct sequence (Error name, Expected value, Rows with error) but the description isn’t entirely accurate. The descriptions themselves need to be revised. I have provided a link and the image to the correct descriptions for each error, including the maximum number of errors allowed per column (e.g., if a table can have no more than 2 errors, then no more than 2 errors should appear). https://www.figma.com/design/K7gNHRnlYuG27w8XGVquY5/Warnings%2FErrors?node-id=99-614&t=I8wrzyrxl8l4AKeu-1

I hope these suggestions are helpful. The work so far is impressive, and with these minor tweaks, it will be even better!

Image

JulianForeman commented 3 months ago

I have implemented the majority of these fixes. 1-3 are done; but I think addressing 4 is going to take more work than it looks like on the surface. I think this is something that should be made it's own ticket because it will likely require sending new specific data structure to the frontend for certain errors.

shayjeff commented 3 months ago

Another card was created to address number 4.