Skip to content

docs: document uncomplete authority, working list filter minimum characters and calendars - #4720

Open
karolinelien wants to merge 5 commits into
masterfrom
docs/capture-doc-gaps
Open

docs: document uncomplete authority, working list filter minimum characters and calendars#4720
karolinelien wants to merge 5 commits into
masterfrom
docs/capture-doc-gaps

Conversation

@karolinelien

@karolinelien karolinelien commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What this does

Fills three gaps found while auditing the Capture app's user-facing surface against the user docs.

1. Reopening a completed event requires an authority. Added one line to the existing note about why an event cannot be edited. The tooltip in the app tells the user what is wrong but not which authority to ask for. canUncompleteEvent does not feed the read-only calculation (useEventEditPermissions.ts), so the form stays editable and only the Complete event checkbox locks, and the wording reflects that. The authority display name Uncomplete events was read from /api/authorities.json on a 2.43.1 instance, not guessed.

2. Search performance settings on tracked entity attributes. Adds minCharactersToSearch next to the existing note about preferredSearchOperator, and rewrites both in the wording the UI actually uses.

  • These four properties are not editable in the legacy Maintenance app, which the old paragraph claimed. That app only renders a field if it is listed for the model in src/config/field-config/field-order.js, and its trackedEntityAttribute list contains none of them. They are only editable in the Metadata Management app, under Tracked entity attributes → Search performance — a section that app hides below server version 2.43 (hasAPISupportForFeature, { minor: 43 }), so the version requirement is stated too.
  • Both paragraphs now use the labels and options the Metadata Management app shows — Preferred search operator, Blocked search operators, Minimum characters required to search, and EQ | Equals / SW | Starts with / EW | Ends with / LIKE | Contains — instead of raw API property names.
  • Corrects the value types the operator settings apply to. PERCENTAGE was moved into forcedSearchOperators by 01cff4f (DHIS2-12881) and now ignores preferredSearchOperator, so the honoured types are text, long text, email and phone number. Unique attributes and attributes with an option set always resolve to EQ, which was not stated.
  • On minCharactersToSearch, the runtime message is self-explanatory, so the paragraph focuses on the dead end: a filter can only hold as many characters as its value type allows (10 for a date, 5 for a time, 3 for a percentage — withMinCharsToSearchValidation.tsx), so a higher minimum can never be satisfied and the filter shows Minimum characters to search is too high for this filter.

3. New "Dates and calendars" section. Non-Gregorian calendar support had no user documentation at all. Covers where the calendar comes from, which surfaces it affects, and that values are stored as ISO 8601 so exports and the API show Gregorian equivalents. Includes a screenshot of the report date picker on a Nepali-calendar server, captured on a 2.43.1 instance.

AI Assisted.

…lendars

Fills three gaps found while auditing the Capture app's user-facing
surface against the user docs.

- Reopening a completed event requires the "Uncomplete events" authority
  (F_UNCOMPLETE_EVENT). Added to the existing note about why an event
  cannot be edited. The authority does not feed the read-only
  calculation, so only the "Complete event" checkbox locks.
- minCharactersToSearch also applies to working list filters, and a
  value above the value type's character limit makes the filter unusable
  altogether. Added to the existing search metadata note, with a sample
  value per type so the limits are self-explanatory.
- New "Dates and calendars" section covering non-Gregorian calendar
  support, the surfaces it affects, and that values are stored as
  ISO 8601. Includes a screenshot of the report date picker on a
  Nepali-calendar server.

AI Assisted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@karolinelien
karolinelien marked this pull request as ready for review September 4, 2026 12:32
@karolinelien
karolinelien requested review from a team as code owners September 4, 2026 12:32

@henrikmv henrikmv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @karolinelien!

Comment thread docs/user/using-the-capture-app.md Outdated

![](resources/images/search-by-attributes-on-scope-program-preferredSearchOperator.png)

Tracked entity attributes can also define **minCharactersToSearch** in Maintenance. The same minimum applies to the attribute's filter in working lists, which shows *Please enter at least N characters to filter* until enough characters are entered. Set this value with care for non-text attributes. A filter can only ever hold as many characters as its value type allows - 10 for a date (2026-09-04), 5 for a time (14:30) and 3 for a percentage (100) - so if the minimum is higher than that, the filter cannot be used at all and shows *Minimum characters to search is too high for this filter*.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MaintenanceMetadata Management app

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the search performance section a little bit to use the UI text etc. Have a look please @simonadomnisoru and @henrikmv

Review feedback on #4720: the new
minCharactersToSearch paragraph pointed at Maintenance. It now points at the
Metadata Management app, matching the naming already used elsewhere in the file.

AI Assisted.
The preferredSearchOperator/blockedSearchOperators/minCharactersToSearch
paragraphs used raw API property names and pointed at Maintenance. These
properties are not editable there: the legacy Maintenance app only renders
fields listed in its trackedEntityAttribute field-order config, and none of
the four Search performance fields appear in it. They are only editable in the
Metadata Management app, under Tracked entity attributes -> Search performance.

Rewritten with the labels the Metadata Management app shows (Preferred search
operator, Blocked search operators, Minimum characters required to search) and
the operator options as they are listed there.

Also corrects the value types the operator settings apply to. PERCENTAGE was
moved into forcedSearchOperators by 01cff4f, so it now ignores
preferredSearchOperator; the honoured types are text, long text, email and
phone number. Unique attributes and attributes with an option set always
resolve to EQ, which was not stated.

AI Assisted.
The Metadata Management app strips the searchPerformance section from the
tracked entity attribute form when the server is below 2.43
(hasAPISupportForFeature, { minor: 43 }), so the settings cannot be reached at
all on older servers.

AI Assisted.
Clarified the requirements for the Search performance section in the Metadata Management app.
@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants