# Business rules — ieb-inde-2

Evidence date: 2026-10-13. Inspected revision: `main` at `8e2b139`.

Provenance: **Documented** only where the readme or config states the rule. Everything else below is **Implemented** or, where marked, **Inferred**.

Website root: `INDE-2/Evolution Software Unified Framework/Evolution Software Unified Framework/core_custom/INDE-2/`.

## Identity

BR-001. The readme defines CRM as INDE-2. **Documented.**

BR-002. Cluster notice subjects are `IEB CRM - Cluster Notice` and `IEB CRM - Cluster Meeting Notice`. **Implemented.**

BR-003. The active connection catalog is `Framework_INDE-2_Demo` on host `156.38.132.194`. A commented block names catalog `Framework_INDE-2` on that host and on the local server. Which catalog is production is **Unknown / Requires Confirmation**.

BR-004. The app setting `website` is stored twice, as `IEB (INDE-2 Local)` and as `IEB CRM`. **Documented** in `Web.config`. Which value the running site reads was not executed. **Unknown / Requires Confirmation.**

## Framework access

BR-005. Framework user types are WebsiteUser (1), PowerUser (2), SuperUser (3), AdminUser (4), and CustomUser (5). **Implemented.**

BR-006. Generated surface buttons compare `userType` with the surface access level. CustomUser is compared through `mimicUserType` instead. **Implemented** in the generated grid code. How mimic is assigned was not traced. **Unknown / Requires Confirmation.**

## Cluster code

BR-007. Cluster code is not editable on the form. **Implemented.**

BR-008. After a cluster code exists, province, level, subject name, cluster name, and area are not editable. **Implemented.**

BR-009. A code is generated only when the code is empty and the level, the subject, and the province lookup all return a row. The shape is `{level abbreviation}-{subject code}-{province custom code}-{nn}`. **Implemented.**

BR-010. The sequence is one more than the count of existing codes with that prefix, or `01` when the count is 0. The number is zero-padded to two digits. **Implemented.** Two saves that both see the same count can write the same code. **Inferred.** No unique constraint was found in the INDE-2 script folder.

BR-011. If any of the three lookups fails, the cluster is saved without a generated code, and BR-008 does not lock the identity fields. **Implemented.**

## Cluster permissions

BR-012. A user below PowerUser sees the new-member button only when some resource on that cluster stores their `recId` in `ResourceName`. **Implemented.**

BR-013. That same user sees the new-meeting button, and can edit or remove meeting rows, only when the matching resource type is exactly `Cluster Administrator` or `Cluster Leader`. The first matching resource wins. **Implemented.**

BR-014. PowerUser and above do not enter that block. Their buttons follow the generated surface access levels. **Implemented.**

BR-015. On the cluster's child grid, the meetings repeater forces the edit and remove header cells visible. Other child repeaters keep the generated access check. **Implemented.** Dated 2018-05-17.

## Members and resources

BR-016. A cluster member's name list is limited to school contacts of the selected school whose active year is the current calendar year, and those contacts' user ids must be active users of the setup customer code. **Implemented.**

BR-017. Member email, SACE number, and active year are read-only on the form. **Implemented.**

BR-018. Inserting a member with a non-empty email sends `Cluster Linked Email Notification`. Updating a member does not. **Implemented.**

BR-019. A cluster resource's name list is limited to active members of that cluster who have an email. **Implemented.** Dated 2019-03-06. **Inferred** from the comment that the author treated every resource as already a member.

BR-020. Resource type and resource email are read-only on the form. Email is copied from the selected user. **Implemented.**

BR-021. Changing a resource email on update, when the new email is not empty, sends `Cluster Linked Email Notification` with `{ResourceTypeOrMember}` set to the resource type. Inserting a resource does not send it. **Implemented.** The comment on the update branch says the mail is for linking a new resource. **Inferred** disagreement between the comment and the branch.

BR-022. Choosing "Add New" on a contact, member, or resource name list opens the contact modal. The contact and resource forms use `#modContactAdd`. **Implemented.**

## Meetings

BR-023. Saving a meeting copies the parent cluster's area, code, name, level name, province display, and subject name onto the meeting. **Implemented.** Province uses lookup `display`, not `customCode`. The source comment questions that choice.

BR-024. After a successful save, mail is sent only when `ClusterMeetings_ClusterMeetings_SendEmail` is checked. **Implemented.**

BR-025. That mail goes to each active member of the parent cluster who has an email. It does not go to resources. The resource loop is commented out. **Implemented.**

BR-026. If the `website` setting contains `local`, `dev`, or `demo`, cluster and meeting notices are sent to the admin mailbox instead, and the intended recipient is appended to the subject. **Implemented.** Combined with BR-004, the value `IEB (INDE-2 Local)` contains `local`. If that value is the one read, every notice is redirected. **Inferred.** **Unknown / Requires Confirmation.**

## Schools and contacts

BR-027. A WebsiteUser editing an existing school contact cannot change the name dropdown or the email. **Implemented.** Dated 2019-04-25.

BR-028. A WebsiteUser adding a contact is offered only "Select" and "Add New", unless session `contAdded` is set or the user is above WebsiteUser. **Implemented.**

BR-029. On a school's contact grid, cluster name and code come from the first active member row with that email, and that member's first cluster. Further clusters are ignored. **Implemented.** Dated 2019-03-06.

BR-030. The contact form hides the cluster name and cluster code sort controls. **Implemented.**

BR-031. The subject list on a contact is the active subject catalogue, ordered by name. **Implemented** in the form. The 2020-03-20 script sets surface field `495` (`SchoolContacts_SchoolContacts_Subjectifapplicable`) to field type `30`, relational object `publ_SubjectManagement`, relational value `itemID`. The form still binds a multi-select list. **Unknown / Requires Confirmation** which definition the database and the page agree on.

BR-032. The 2020-03-25 script, for surface `3044`, shows email on the grid, hides mobile from the grid, and sets grid sequence for principal, IEB liaison, cluster name, subject, and cluster code. **Documented** as a script in the tree. Whether it has been applied to the demo or live database is **Unknown / Requires Confirmation.**

## Import

BR-033. A published child-file import on a cluster creates a WebsiteUser when `Member Email` plus the setup customer code is not already a user. The name is split on a comma, otherwise on a space, otherwise the whole value is the surname. **Implemented.**

BR-034. That user-creation block runs for every published child import on the cluster form, not only for the members surface. A sheet without `Member Email` throws inside the loop and the page redirects to `/error`. **Implemented.**

## Mail templates and failure

BR-035. Linked notices require a template named `Cluster Linked Email Notification`. Meeting notices require `Cluster Meeting Email Notification`. The template body is merged with cluster and, for meetings, meeting fields, then `{WebAddress}` and image paths are rewritten from `WebAddy`. If no template row exists, the body stays empty and send still runs. **Implemented.** **Inferred** that an empty body is a data defect, not a guarded error.

BR-036. Meeting send failures are logged and do not redirect. Other custom surface failures redirect to `/error`. **Implemented.**

## Leftover rules that are not CRM rules

BR-037. Several forms still contain a branch for setup code `STUD-1` that renames save on a surface named Profiles and disables the save dropdown when the surface name starts with Device. **Implemented.** No INDE-2 readme entry describes STUD-1.

BR-038. Examination role checks remain in `attachments.ascx.cs` and `surfaceNotes.ascx.cs`, using `examNums`. No examination surface form is in `surface_custom`. **Implemented** as code. Whether it can run depends on database surfaces that were not in this tree. **Unknown / Requires Confirmation.**
