Skip to content

Fix: Use short names instead of fully specified names in form builder#129

Open
petershale21 wants to merge 1 commit into
Bahmni:masterfrom
petershale21:feature/use-short-concept-names
Open

Fix: Use short names instead of fully specified names in form builder#129
petershale21 wants to merge 1 commit into
Bahmni:masterfrom
petershale21:feature/use-short-concept-names

Conversation

@petershale21

Copy link
Copy Markdown

Problem
When building forms using Forms 2.0 in implementer interface v1.1.1, the form builder displays fully specified names instead of short names for:

  • Concept labels on the form
  • Answer options in coded concepts
  • Nested answers and set members

This makes the form builder UI cluttered and less user-friendly, especially for concepts with long fully specified names.

Solution

  • Updated the concept REST representation in constants.js to include the names field, which contains all concept names including SHORT names
  • Added a recursive setShortNames function in ControlPropertiesContainer.jsx that:
    • Finds and applies SHORT names to concepts when available
    • Recursively processes answers and setMembers to apply short names at all levels
    • Falls back to fully specified names when SHORT names don't exist

Testing

  • Tested with concepts that have short names
  • Verified both the main concept label and answer options display short names
  • Confirmed fallback works when short names don't exist (uses fully specified name)
  • Tested with nested concepts (answers with their own answers/setMembers)

@CLAassistant

CLAassistant commented Jul 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants