Skip to content

Conversation

@Phil-V
Copy link
Contributor

@Phil-V Phil-V commented Jan 2, 2026

refs: IA-4677

This fixes a performance issue with the /api/forms/20/?fields=possible_fields endpoint, where unnecessary annotations (last instance and instance count) were performed but not used in the response.

Self proofreading checklist

  • Did I use eslint and ruff formatters?
  • Is my code clear enough and well documented?
  • Are my typescript files well typed?
  • New translations have been added or updated if new strings have been introduced in the frontend
  • My migrations file are included
  • Are there enough tests?
  • Documentation has been included (for new feature)

Doc

/

Changes

  • Set the default ordering to id for the details action, avoiding the more expensive annotations.

How to test

Try pages related to the form endpoint to see if they don't throw exceptions:

  • Test the Entity details page
  • Test the Form list page
    • Test the csv/xlsx exports
  • Test the Form details page
  • Test the Form Submissions page, and check that the form dropdown is not broken

If a specific config is required explain it here: dataset, account, profile, etc.

Print screen / video

/

Notes

I'm not 100% sure about the /manifest/ or /manifest_enketo/ endpoints, that could be affected by this change but I couldn't test with real data.

Follow the Conventional Commits specification

The merge message of a pull request must follow the Conventional Commits specification.

This convention helps to automatically generate release notes.

Use lowercase for consistency.

Example:

fix: empty instance pop up

Refs: IA-3665

Note that the Jira reference is preceded by a line break.

Both the line break and the Jira reference are entered in the Add an optional extended description… field.

Sets default order to id in the form details view

refs: IA-4677
@Phil-V Phil-V changed the title IA-4677: Fix unnecessary annotations in form possible_fields endpoint IA-4677: Fix unnecessary annotations with form possible_fields Jan 2, 2026
@quang-le quang-le added the release Should be released in production at next deploy label Jan 2, 2026
@Phil-V Phil-V marked this pull request as ready for review January 2, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Should be released in production at next deploy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants