Automated Collections for Moderators

Este artículo está disponible en otro idioma: leer (English)
Tabla de contenidos

Automated collections keep source collections organized without manually adding every source. A moderator defines a rule for a repository, and the system creates the required child collections from parts of the reference code, such as fund, inventory, and case. Matching sources are added to the deepest generated collection.

This guide is for admins, moderators, and sources moderators.

What Automated Collections Do

Automation works from a source's repository links. For each source, the system looks at the ReferenceCode for the selected repository, applies the configured regex, and extracts the logical parts of the archive signature.

For example, this code:

can be extracted as:

If hierarchy levels are fund, inventory, the system creates:

The source is added only to the deepest generated collection. In this example, that is Inventory 2, not the root DAKO collection.

Who Can Configure Automation

Automation can be configured by:

  • admins;

  • moderators;

  • sources moderators.

A moderator can attach automation to an existing manually created collection, even if they are not the owner. Normal collection editing, child collection management, and manual memberships still follow owner, editor, or admin permissions.

Option 1: Root for a Whole Repository

Use this when the collection represents an entire repository or a broad repository section.

Example for DAKO:

In the collection form:

Capture mappings:

Hierarchy levels:

Rule text can be a simple human-readable description:

Option 2: Root for a Specific Fund

Use this when the collection itself already represents a fund, such as Fund 280.

In that case, do not create another fund child. Fix the fund in the regex:

Capture mappings:

Hierarchy levels:

Result:

When Funds Have Letter Prefixes

Ukrainian archive funds may include letters, for example:

If the rule should accept both ordinary numeric codes and Р-prefixed codes, use:

This accepts:

The group names stay the same:

How to Fill Capture Mappings

Prefer named groups. They are much harder to misconfigure.

Correct:

Do not put the fund number into groupIndex. groupIndex means the regex capture group number: 1, 2, 3. If you enter groupIndex = 127, the system will try to read regex group number 127, not fund 127.

For most rules, avoid groupIndex entirely.

How IsActive Works

IsActive controls automated processing.

  • IsActive = true means the system can add new automation-owned memberships, create missing child collections, and remove stale automation-owned memberships after source updates.

  • IsActive = false means the system skips adds and removals for that automation rule. The current state is effectively frozen.

Manual memberships are never removed by automation.

When Results Should Appear

There are two reconciliation paths:

  1. When a source is created or updated, the system reconciles that one source.

  2. A background job periodically scans active rules and repairs missed updates.

Important: creating a new automated collection does not immediately process every old source. For existing sources, wait for the background job or trigger it manually in Hangfire.

In local development, the job is named:

How to Test a Rule

Before saving the rule, take 3-5 real reference codes from sources linked to the same repository and check whether the regex accepts them.

Example:

If a source has several repository links, automation uses only the ReferenceCode that belongs to the selected repository. A FamilySearch or Wikisource code will not satisfy a DAKO rule.

Common Mistakes

  • Selecting the wrong repository.

  • Sources do not have a ReferenceCode for the selected repository.

  • The regex accepts only 280-2-1476, but real codes look like Р5597-1-12051.

  • The fund number is entered into groupIndex.

  • A mapping points to a group that does not exist in the regex.

  • Expecting an existing manual child collection to be adopted automatically. Automation currently finds generated children by ruleKey, not by title.

  • Expecting sources to appear on the root collection. Sources are added to the deepest generated level.

Editing a Rule

Edit the root automated collection. Generated child collections display automation metadata, but their automation settings are not meant to be edited manually.

When changing the regex or hierarchy levels:

  1. Check which generated collections already exist.

  2. Change the rule on the root collection.

  3. Run or wait for reconciliation.

  4. Verify whether older generated branches are still useful.

Automation manages source memberships, but it does not automatically delete old empty generated collections.

Practical Recipe for a New Archive

  1. Create a root collection named after the archive or fund.

  2. Enable automation.

  3. Select the correct repository.

  4. Add a regex that matches real archive signatures.

  5. Add capture mappings using named groups.

  6. Set Hierarchy levels.

  7. Save.

  8. Update one test source with a matching ReferenceCode.

  9. Check that child collections were created.

  10. For existing sources, run or wait for background reconciliation.

3 julio 2026
Contáctenos Términos de servicio • © 2026 OpenHeritage • 🇺🇦 Hecho con orgullo en Ucrania • v2.11.6
An unhandled error has occurred. Reload 🗙