search ids are generated and assigned to a customer (client, group, center) on creation and when groups or clients are transfered to new parent entities.
The problem is that it uses the max_child_count value as part of the search_id string. This value is incremented for each parent when a child customer is added to its hierarchy. It is also decremented when the child is removed/transfered out. By decrementing, it is possible to have a scenario whereby new customers are assgned a search_id that is the same as existing siblings.
The result of this on the application is not totaly understood but certainly for groups and centers can cause problems as seen in other issues such as and MIFOS-2652.
As part of build https://ci.mifos.org:8843/hudson/job/trunk/1247, the ability to decrement max_child_count was removed. Upgrade 240 may need to be updated to facilate edge case of max_child_count+1 being less than the value used when creating search_id of other siblings.
There is also a problem with search_id generation for customers that will have no parent.
when generating the search_id, a count is performed of all types of that customer (center, group, client) within a given branch, it should be a count of all customers within a given branch that have no parent
verified functionally testing and