City-of-Bloomington / energov

Integration and data conversion code for the Energov Community Development deployment.
0 stars 0 forks source link

Citation closed criteria #56

Closed inghamn closed 2 years ago

inghamn commented 2 years ago

The criteria I used for setting code_cases to closed was not matching people's expectations. The new criteria will likely contain a cut-off date. Citations older than a certain date would be considered closed, no matter what the statuses say.

inghamn commented 2 years ago

Once it's been "Sent to Legal", the legal actions we can consider closed are:

We also think, If it's been "Sent to Legal" and there's no legal status, then anything older than 3 years can be considered closed.

inghamn commented 2 years ago

For stuff that hasn't been "Sent to Legal", we can consider it closed if:

    select id
    from citations
    where  status in ('WARNING', 'VOID', 'ADMIN VOID')
    or (status in ('PAID', 'UNCOLLECTABLE')
        and complied_status in ('Complied', 'Abated'))