US-EPA-CAMD / easey-ui

Project Management repo for EPA Clean Air Markets Division (CAMD) Business Suite of applications
MIT License
0 stars 0 forks source link

Provide specific import messaging when user has duplicate EM records #6204

Open mxtomoto1 opened 7 months ago

mxtomoto1 commented 7 months ago

Refer to #6100 for context. This is dependent upon #6203. We need to implement more detailed messaging for the user to indicate what the duplicated record is, e.g., duplicate summary_value record, duplicate daily cal record for XX date and XX hour, etc.

Generic Message Format

Import contains duplicate [Table Name] data for [Unique Column Names] with values [Unique Column Values].

Emissions Tables with Unique Constraints

There is only one.

Table Unique Columns
SUMMARY_VALUE MON_LOC_ID, RPT_PERIOD_ID, PARAMETER_CD

Summary Value Message Format

Import contains duplicate SummaryValue data for Location '[unitId or stackPipeId]', Quarter [year] Q[quarter], and Parameter Code '[parameterCode]'.

### Tasks
lgiannini1 commented 3 months ago

Edit: ECMPS 1.0 has the same behavior when importing an emissions file with multiple duplicate summary values.

image

ntknguyen commented 2 months ago

Verified this issue is fixed. Tested on importing the provided json file and retrieved the expected error message:

Image