Skip to content

Conversation

@labkey-tchad
Copy link
Member

Rationale

https://github.com/LabKey/kanban/issues/689

Field labels are an inconsistent way to define and reference data. We should encourage and enable tests to use field keys and field names instead.

This update allows data Maps to be keyed differently when extracted from various grid components for test validation. In addition to the existing label-keyed maps, there are now methods to key data by FieldKey or by name (unencoded FieldKey).

When looking for specific columns, the grid components will accept encoded or unencoded field keys in addition to labels. This allows the many existing tests that use field labels to continue to do so while allowing new tests to be more precise.

Some components that already found columns by encoded FieldKey (bulk update forms and details tables) have been updated to find FieldKey objects or Strings. Strings are assumed to be field names which the component will encode. This allows tests to not have to bother with fieldKey encoding except when absolutely necessary (e.g. parent or source lookups). Note: I would like to implement a similar change to the grids but that can wait

Related Pull Requests

Changes

  • Update Grid components to understand field keys and names
  • Update FieldKey to extend CharSequence
  • Update "Add Source" and "Add Parent" menu helpers to synchronize editable grid
  • Unify CSV/TSV generation between TestDataGenerator and TestDataUtils

@cnathe cnathe removed their request for review May 28, 2025 12:49
@labkey-tchad labkey-tchad merged commit 7ce7584 into develop May 28, 2025
6 checks passed
@labkey-tchad labkey-tchad deleted the fb_trickyCharsPhase3 branch May 28, 2025 20:59
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.

4 participants