Allow 2 School Accreditations for one school in the same year

Issue #395 closed
Brian Lewis repo owner created an issue

Currently, it won;t allow this, but that's just logic in the trigger - not a database schema limitation. Two School Inspections in the one year can be part of two different inspection sets

Comments (6)

  1. Brian Lewis reporter

    @ghachey bit confused why SchoolAccreditation view takes the field inspYear from inspsetName ie the name field. If we are going to allow two inspection sets in the one year, I'd like the name to distinguish them: e.g. perhaps:

    Accreditation 2018

    Accreditation 2018 (2)

    Is this something I can change ( obviously, without breaking existing data?)

  2. Brian Lewis reporter

    With the benefit of 20-20 hindsight, I think if we have to implement custom inspections like this in the future, we should first consider doing them via the Xml techniques used in the Sols for Kobo integration. That is, all the custom fields that have required an additional table and editable view are just packaged into the Xml field on SchoolInspection. Then we just need a view to dig them out of the Xml for presentation.

  3. Ghislain Hachey

    Regarding the name. This is what I had original thought. I was thinking 2018, 2018 (2), etc. I don't think it would break any "data". I would need to edit some views that currently uses the year to get the most recent accreditation for schools. I ideally wanted to use the dates field for that but most raw school accreditation submitted don't have dates.

    We don't use Kobo integration in FSM/RMI. We will use custom developed Android data collection apps. If we can package the XML fields into the SchoolInspection in the same way then I'm fine with that.

  4. Log in to comment