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

Require version number in JSON schema #6339

Open ibarra-michelle opened 3 months ago

ibarra-michelle commented 3 months ago

Description

When utilizing a json file that does not include a version data element (e.g. "version": "1.0.0",), then going through a series of steps adding, importing, deleting, and importing the file again, ECMPS 2.0 will still display the deleted component data in the UI, even though the latest imported file does not include component data. When JSON files with the version number that have componentID data deleted and then the file is imported, ECMPS 2.0 does not appear to display the delete componentID data (i.e., UI display matches the file data as expected). Image

Steps to reproduce the issue

  1. Login to ECMPS as a data submitter, navigate to the MP module, Open and Checkout the following config: ORISE 470 Location 1.
  2. Import a file where new componentID data has been added and the previous utilized componentID now has an endDate and endHour. I added an endDate and endHour to componentID 113 and added new componentID 130 See file-1....json.
  3. Navigate to the Sections dropdown, select Systems, select System ID 112, and you can see the new component data for componentIDs 113 and 130.
  4. Modify the file to delete the componentID 130 data and remove the an endDate and endHour of componentID 113. See file-2....json.
  5. Import file-2....json into ECMPS.
  6. Navigate to the Sections dropdown, select Systems, select component 112, and you can still see the componentID 130 data that was deleted the file yet still in displayed in ECMPS. Image

file-2-MP Export - Comanche (470), undefined (6-24-2024).json file-1-MP Export - Comanche (470), undefined (6-24-2024).json

Acceptance Criteria

annalbrecht commented 3 months ago

Document the requirements and then implement them.

yonatan-dp commented 3 months ago

Acceptance Criteria for JSON Schema Import

1. Version Attribute Requirement

ibarra-michelle commented 3 months ago

Acceptance Criteria for JSON Schema Import

@yonatan-dp should an AC to update the "lastUpdated" schema field be added to the list of ACs you provided? Thx

@ibarra-michelle, I have updated the acceptance criteria to include that.

maxdiebold-erg commented 1 month ago

In addition to adding this version check to the Monitoring Plan import process, the check should be added to the import processes of the Emissions and QA modules.

mark-hayward-erg commented 1 month ago

@usmanahmederg @maxdiebold-erg please revert the merge of the associated PRs from the develop branches. We are not yet ready to merge Sprint 11 PRs into develop.

mark-hayward-erg commented 1 month ago

@usmanahmederg you will need to recreate the original PRs so the necessary changes can be merged into develop at the appropriate time.

lgiannini1 commented 2 weeks ago

Not sure if this issue is related to this ticket, but the following errors are returned when trying to import QA data from historical. This error was returned for ORIS 147, K-7 and ORIS 3, 1, 2, CS0AAN for all quarters I tried (2023 Q1 through 2023 Q3)

Image

mark-hayward-erg commented 2 weeks ago

Not sure if this issue is related to this ticket, but the following errors are returned when trying to import QA data from historical. This error was returned for ORIS 147, K-7 and ORIS 3, 1, 2, CS0AAN for all quarters I tried (2023 Q1 through 2023 Q3)

Image

Yes. These errors indicate that the logic used to generate the JSON from historical also needs to be updated.

mxtomoto1 commented 1 week ago

Files (QA test, emissions) are able to be imported from historical successfully . All exported JSONs show version number, and files (MP, QA test, cert event, TEE, emissions) with version number omitted cannot be imported.

t_d1

(As a side note, only MP shows one error message, whereas the other modules also state, "Version number must be a string.")

ibarra-michelle commented 3 days ago

Verified in test for various facilities (ORIS 470 Config 2; Silverhawk 55841 Config A01; ORIS 612 Config FMCT2A):

MP

QA QA - Test Data -Removed version Image

QA- Cert Event

QA -TEE

Emissions