Address Hierarchy not working when adding 1st level

Tags: #<Tag:0x00007f569c5c1eb8>

Scenario - add very first level of address hierarchy

Issue: OpenMRS not adding the address hierarchy level when adding the address level from “manage address hierarchy page”, its not showing any error message either. It is adding a new level if there is at least one hierarchy level already exists.

Anybody experienced this?

Are you able to reproduce it here? https://qa-refapp.openmrs.org/

Yeah, exactly same behaviour in QA refapp too.

These are the steps to reproduce it

Goto “System Administration” - > “Advanced Administration” -> “Manage Address Hierarchy” - > “Add New Address Hierarchy Level” - Then add “name” and “address field” click “save”

Application goes back to “Manage Address Hierarchy” page without adding the new entry to displaying some sort of error.

It is by design that if a level has no entries and no parents, it is automatically deleted. https://wiki.openmrs.org/display/docs/Address+Hierarchy+Module

Interesting, how can we add entries with out level entry?

Have you taken time to go through the link that i provided?

Ok, I understand that address hierarchy entries needs be imported, then it will creates the levels, is that how it suppose to work? if thats the case may be we can show the message somewhere on UI saying that we can’t add first level through UI.

It’s confusing if UI allows to add new level and deletes it quietly without any warning or message.

I agree. Can you create a ticket for it?

Sure, I will create a ticket, I don’t mind working on it as well, might need some help to get up and running though.

Working on it will be awesome! :smile:

The community is here to help you.

Sorry mate, looks like I don’t have access to create tickets, how do I request access for issues?

@vamsi77 for the record AH is also able to load address levels and address entries upon starting up by placing two files in /addresshierarchy inside the OpenMRS app data dir. Here is an example of such config.

You may also try this route if the old legacy UI failed you.

Thank you for this information.