Stack Overflow error when updating facility with not-unique code


I noticed an issue when I was testing OLMIS-3240.

After creating a facility with a not-unique code (i.e. the same as that of an already-existing facility but with different casing), going to the facility's edition and trying to update the facility's code, the facility was not updated. Instead, an Internal Server error cause by Stack Overflow was returned. The error does not occur after each save. Sometimes, one has to update the facility's code more than once for it to occur. The facility's data before the attempt to update them were as on the attached screenshots.

Reproduction steps:

  1. Log into the application as administrator.

  2. Go to Administration > Facilities.

  3. Create a facility with any data but with a not-unique code, e.g. hc01 (the same as for Comfort Health Clinic but with different casing).

  4. Go to facility's edition and change the facility's code.

  5. Save the changes.

  6. The Internal Server Error occurs because of Stack Overflow.

Expected behavior:

  • The facility code must be unique regardless of casing. The facility code hc01 and HC01 are the same, and not unique. If the admin enters in a facility code that is not unique, then they should receive an error message stating that the Facility code must be unique.




Joanna Szymańska
September 5, 2018, 6:11 AM

I checked and everything works correctly.

Joanna Szymańska
September 3, 2018, 2:45 PM

Reproduction steps:
1. Log into the application as administrator.
2. Go to Administration > Facilities.
3. Click the "Edit" button next to any facility.
4. Change Facility Code, e.g. delete one character or add.
5. Click the “Save” button.

The information appears: “There was an error with this request, please contact the server administrator. No message available” and "Internal Server Error" in Response.

Łukasz Lewczyński
September 3, 2018, 2:32 PM

I don’t think so. Please add repro steps and assign it to me.

Joanna Szymańska
September 3, 2018, 2:29 PM

When I checked this ticket I noticed that when I change the Facility Code for an existing one in the system, "Internal Server Error" appears, in the case of the newly created facility this is not happening. Is this the correct behavior?

Joanna Bebak
July 3, 2018, 6:32 AM

It appears that the validation for the uniqueness of the facility code doesn't work 100% correctly, as it's possible to create a facility with a not unique code when different casing is used. When the same casing is used, the validation works correctly - a proper error message appears, and the facility is not created. So yes, if the validation for the facility code starts working correctly and takes into account also casing, the bug won't be occurring.



Łukasz Lewczyński


Joanna Bebak


Story Points


Time tracking


Time remaining


Epic Link




Fix versions

Affects versions