gaepdit / geco

Georgia Environmental Connections Online
0 stars 0 forks source link

A facility is able to add more than one CAERS certifier #606

Closed dougwaldron closed 5 months ago

dougwaldron commented 5 months ago

Reported by Maria via email.

CAERS only allows one certifier per facility. GECO tries to prevent more than one certifier being added, but a user can bypass this restriction by opening the Emissions Inventory page in two separate windows and then adding a new certifier in each. Or two users might open the EI page at the same time.

GECO removes the certifier option based on data available when the page is loaded, but an equivalent check needs to take place when the data is saved. This could be done in the store procedure geco.Caer_CreateContact.

dougwaldron commented 5 months ago

Code fixed in https://github.com/gaepdit/airbranch-db/commit/f7b4c907bec29b0e8f4d872db36e21f34417a11c

Data fixed with:

UPDATE AIRBRANCH.dbo.EIS_CaerContacts
SET Active         = 0,
    UpdateGecoUser = 21017,
    UpdateDateTime = getdate()
WHERE Id = N'9BB82FEE-E221-4C02-9D65-1D48E6785BFC'