City-of-Bloomington / master_address

Web application for handling city addressing
https://bloomington.in.gov/master_address
GNU Affero General Public License v3.0
0 stars 1 forks source link

Street name change error #118

Closed inghamn closed 4 years ago

inghamn commented 4 years ago

When attempting to rename "N Range Rd" to "E Discovery Parkway", the system threw an uncaught error. Call to undefined function "ChangeNameResponse()" in ChangeName.php line 73. There is a typo in the code, it should be "return new ChangeNameResponse()".

But this is also the exception handling portion of the code. Something else went wrong during the name change to trigger this portion of the code.

inghamn commented 4 years ago

After fixing the error handling we can now see the SQL error.

SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "street_designations_street_id_rank_key" DETAIL: Key (street_id, rank)=(1661, 1) already exists.

laurahaley commented 4 years ago

looks like we need to shuffle the ranks of the existing designations before creating the new street name designation.

inghamn commented 4 years ago

Yes, the error is that the designation shuffling code was not updating the rank correctly. I'm working on fixing that part.