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

Add Non Load Based Indicator field to UI #6342

Open esaber76 opened 1 month ago

esaber76 commented 1 month ago

Overview

For ECMPS 1.0, the Non-Load-Based Indicator (NON_LOAD_BASED_IND) is stored in the CAMD.UNIT table on the host and the ECMPS.UNIT table on the client. Non-Load-Based Indicator is editable in ECMPS 1.0 and should be editable in ECMPS 2.0.

Currently ECMPS 2.0 stores the Non-Load-Based Indicator in the CAMD.UNIT table. However, editable (submittable) data must exist in the CAMDECMPSWKS schema when it is edited and before it is submitted. To enable the editing and submitting of the Non-Load-Based Indicator, a new UNIT table will be created in the CAMDECMPSWKS schema that will contain the columns listed below. The Non-Load-Based Indicator in that table will be submitted to the CAMD.UNIT table when an MP is submitted, and will be updated from the CAMD.UNIT table when an MP is reverted (or otherwise copied) from official.

Acceptance Tests

Change List

Additional Considerations

6233 was created to display Unit Attributes including Non Load Based Indicator, CO, CCO, etc, as well as Unit Program and Reporting Frequency data. This matches the ECMPS 1.0 Unit Characteristics Tab's sub tabs:

Based on this ticket, #6233 should include the items under bullet Unit Attributes above in the grid and pop-up for this ticket as read-only items. Pull the additional (non-editable) values from the CAMD.UNIT table. Do not add them to the CAMDECMPSAUX table.

CAMDECMPSWKS.UNIT Table

Column Name Data Type Required Constraining Values
UNIT_ID numeric(38) Yes
NON_LOAD_BASED_IND numeric(1) Yes 0 or 1
USER_ID varchar(160) Yes
ADD_DATE timestamp Yes
UPDATE_DATE timestamp No

Original Description

See also #6233

This is a placeholder for the needed changes to add the ability for users to update the Non Load Based Indicator. This field does not currently exist and can only be seen in a MP Printout Report.

The database column (NON_LOAD_BASED_IND) is currently in CAMD.UNIT and needs to be moved to CAMDECMPS... (separate ticket(s) for db changes?).

Field in ECMPS 1.0:

image

annalbrecht commented 1 month ago

@lgiannini1 please add acceptance tests.

annalbrecht commented 1 month ago

Developers- please work on in association with #6233.

yonatan-dp commented 3 weeks ago

@djw4erg, I have the following questions on the above:

  1. In the overview section, it states: "To enable the editing and submitting of the Non-Load-Based Indicator, the Non-Load-Based Indicator (NON_LOAD_BASED_IND) will move to the MONITOR_LOCATION tables in the CAMDECMPS and CAMDECMPSWKS schemas." By this, I understand that NON_LOAD_BASED_IND column should be dropped from the CAMD.UNIT table.

@yonatan-dp, I have updated the description. Originally we were planning to move the NON_LOAD_BASE_IND to the MONITOR_LOCATION table, but decided that creating a modified version of the UNIT table in CAMDECMPSWKS was a better solution.

In the change list above

  1. Under "Change List", the first bullet states: " Add a UNIT table to the CAMDECMPSWKS schema using the structure below." Why do we need to add a UNIT table in CAMDECMPSWKS since the only editable field (NON_LOAD_BASED_IND) is moving to MONITOR_LOCATION in both schemas? The rest are read only and won't be involved in revert/submission operations.
  2. Under "Additional Considerations", it states: "Pull the additional (non-editable) values from the CAMD.UNIT table. Do not add them to the CAMDECMPSAUX table." a) This states non-editable data comes from CAMD.UNIT (per #2 above). b) By CAMDECMPSAUX, do you mean CAMDECMPSWKS?
  3. Under "Change List", in the fourth bullet, do you mean CAMD.UNIT instead of CAMDECMPS.UNIT? The Unit table is in the CAMD schema currently (see the overview above too).
  4. Bullet 3 also conflicts with the overview. Is NON_LOAD_BASED_IND moving to MONITOR_LOCATION or we are adding the Unit table to CAMDECMPSWKS. If we are using CAMDECMPSWKS and CAMDECMPS, what do we do with the CAMD.Unit (remove it, or leave it)?
  5. Please note that ticket 6233 also refers to only Unit table from CAMD schema.
lgiannini1 commented 1 day ago

Verified the following on dev:

Issues:

{"response":{"message":"relation \"camdecmps.unit\" does not exist","statusCode":500},"status":500,"message":"relation \"camdecmps.unit\" does not exist","name":"EaseyException","metadata":{}}