You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that the logic determining isFormVariable aligns with backend expectations; current fallback uses enabledSort to infer isFormVariable which may misclassify non-form variables sharing keys, affecting payload type resolution.
constactualSortKey=filterListSortParams?.actualSortKey||filterListSortParams?.activeKey;// Check if it's explicitly set as a form variable or is in the enabled sort setconstisFormVariable=filterListSortParams?.isFormVariable!==undefined
? filterListSortParams.isFormVariable
: enabledSort.has(actualSortKey);if(filterCached){
The new unique column keys (e.g., key_form) must be fully compatible with SortableHeader and any selectors; verify no consumers assume original sortKey names for lookup or test IDs.
// Create a unique key for the column that includes isFormVariable to differentiate between columns with same sortKeyconstuniqueColumnKey=column.isFormVariable ? `${column.sortKey}_form` : column.sortKey;return(<SortableHeaderclassName="header-sortable"columnKey={uniqueColumnKey}title={t(column.name)}currentSort={filterListSortParams}handleSort={()=>handleSort(column)}dataTestId={`sort-header-${uniqueColumnKey}`}ariaLabel={t("Sort by {{columnName}}",{
The checkbox id/htmlFor prefixes "static-" depend on isFormVariable; confirm item.id/name cannot contain spaces or characters invalid in HTML id attributes to avoid selector/accessibility issues.
Preserve previous sort order only for the same active column; otherwise default to "asc". Without this guard, toggling a different column could incorrectly flip order based on unrelated state.
Why: Ensuring the sort order toggles only when the same column is re-selected avoids unintended flips, improving UX correctness. It fits the updated unique key approach and is a meaningful but moderate improvement.
Medium
Add safe fallback on missing option
Avoid silently failing when a sort option is not found. Surface a user-visible fallback by resetting to a safe default sort and proceed, to prevent the UI from getting stuck and keep requests consistent.
Why: Adding a user-visible fallback prevents a no-op return and keeps sorting functional, improving robustness. The change aligns with the new logic and is low-risk, though not critical.
Low
Fix form-variable detection logic
Ensure isFormVariable reflects only form variables. Falling back to enabledSort.has(actualSortKey) misclassifies static fields as form variables, causing wrong API payload shape.
Why: The concern is valid that static fields shouldn't be flagged as form variables, but forcing a strict boolean true/false drops the useful fallback and may break scenarios where isFormVariable isn't provided. Improvement is debatable and potentially over-restrictive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Issue Tracking
JIRA:
Issue Type: BUG/ FEATURE
https://aottech.atlassian.net/browse/FWF-5331
Changes
PR Type
Bug fix
Description
Fix sorting when keys duplicate
Persist actual sort key in state
Disambiguate headers with unique keys
Prevent checkbox id collisions
Diagram Walkthrough
File Walkthrough
DragandDropSort.tsx
Unique checkbox ids to prevent collisionsforms-flow-components/src/components/CustomComponents/DragandDropSort.tsx
TaskList.tsx
Store and use actualSortKey; robust sort optionsforms-flow-review/src/components/TaskList/TaskList.tsx
TasklistTable.tsx
Unique sortable keys and persisted actualSortKeyforms-flow-review/src/components/TaskList/TasklistTable.tsx
taskHelper.ts
Build payload with actualSortKey to avoid clashesforms-flow-review/src/helper/taskHelper.ts