Skip to main content

Error: 'OVERLAPPING LEGAL STATUSES MUST BE RESOLVED' in the populate log

In this article, we explain the “OVERLAPPING LEGAL STATUSES MUST BE RESOLVED” error in the Looked After reports populate log.

Y
Written by Yusef Abulaynain

This can be caused by overlapping legal status records. There is a change in Mosaic 21.1 that should prevent overlapping records from being added from the Mosaic front end.
​
If you do see this error in the populate log, the query below can be used to identify records with overlapping dates.

select
pls.person_id, pls.id legal_status_id, pls_.id other_ls_id,
pls.start_date, pls.end_date,
pls_.start_date, pls_.end_date,
pls.legal_status, pls.legal_status other_legal_status
from
person_legal_statuses pls
inner join person_legal_statuses pls_
on pls_.person_id = cast(pls.person_id as integer)
and pls_.start_date < coalesce(pls.end_date, pls_.start_date + 1)
and pls.start_date < coalesce(pls_.end_date, pls.start_date + 1)
and pls_.id > pls.id
where
( pls.end_date is null
or
pls.start_date < pls.end_date + 0.99999)
and
( pls_.end_date is null
or
pls_.start_date < pls.end_date + 0.99999);


​

Did this answer your question?