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
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
Task list issue while changing attribute filter fixed
Added 'All Fields' option and its edit always to attribute filter dropdown
Page limit changed from 15 --> 25
Removed 'No filters found' text from attribute filter dropdown
No tasks found message css change
PR Type
Bug fix, Enhancement
Description
Fix attribute filter modal effect and share options
Enhance attribute filter save and list update
Improve attribute filter dropdown items and actions
Adjust task list defaults and table behavior
The dependency array of useEffect was changed to [attributeFilter], removing shareAttrFilter and selectedFilter, which may cause the effect to miss updates or use stale values.
The new conditional only shows the save button for "All Tasks" when creating filters, removing the branch for other filters and potentially hiding the button for edits.
The comparison defaultFilterId !== filters.find(...) compares an ID to a filter object (not its id), which is always true and forces unintended default filter resets.
The original check prevented saving on non-"All Tasks" filters; the new AND logic is inverted. Change the condition to require a non-"All Tasks" selection when creating and no edit target.
Why: The current condition only allows saving on "All Tasks" and blocks valid filters; adjusting the logic fixes the save button visibility for non-default filters.
Medium
Handle missing default ID
If defaultFilterId is falsy, the check against find returns false and skips setting a default. Expand the condition to also trigger when defaultFilterId is not set or not found in filters.
Why: If defaultFilterId is falsy or not present in filters, the block is skipped; expanding the condition ensures a fallback filter is always selected.
Medium
General
Fix effect dependencies
The effect depends on both the selected attribute filter and the share option, not just the filter object. Update the dependency array to include both selectedAttributeFilter and shareAttrFilter so it re-runs correctly.
Why: The effect uses selectedAttributeFilter and shareAttrFilter but only depends on attributeFilter, which may cause stale or missing updates when those change.
Medium
Guard metadata on create
When creating a new filter, attributeFilter may be undefined and introduce empty metadata fields. Conditionally spread these ID/metadata properties only if attributeFilter exists.
The save-button visibility logic was inverted by the new condition. It should allow saving when the selected filter is not the default "All Tasks", or when editing an existing filter.
-if (createFilters && (selectedFilter.name === "All Tasks" && !filterToEdit)) {+if (createFilters && (selectedFilter.name !== "All Tasks" || filterToEdit)) {
Suggestion importance[1-10]: 9
__
Why: The PR inverted the save-button conditional, breaking core functionality; correcting this logic is critical for the save button to display under the intended conditions.
High
General
Replace magic number with constant
Pull the hard-coded page size 25 into a named constant (e.g. DEFAULT_PAGE_LIMIT) to keep limit values consistent and easier to adjust.
Wrap the async update call in a try/catch block to handle potential API errors. This prevents unhandled promise rejections and gives you a chance to revert UI state if the update fails.
Why: Joining all candidateGroups IDs provides a more complete view of roles rather than only the first group.
Low
Add fallback defaults for optional fields
Ensure these optional fields always have a consistent type by providing an explicit fallback. This avoids sending undefined to downstream code or APIs that expect null.
Why: The fallback ?? null ensures consistent non-undefined values for optional filter fields and prevents potential API mismatches.
Low
Use immutable array concatenation
Avoid mutating the existing array by creating a new array. This preserves immutability and prevents side effects if currentCriteria is reused elsewhere.
Why: Wrapping the updateFilter call in try/catch ensures proper UI state reset and error feedback, improving robustness with moderate impact.
Low
Omit undefined metadata fields
Only include these filter metadata fields when they are actually defined to avoid sending undefined values in the payload. You can use conditional spreads so that missing properties are omitted entirely.
Why: Using conditional spreads to omit undefined properties cleans up the payload and avoids sending unwanted undefined values, improving maintainability without altering core logic.
Low
Possible issue
Default attribute list fallback
Guard against attributeFilterList being null or undefined before calling filter to prevent runtime errors. Default to an empty array if it's not set.
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: https://aottech.atlassian.net/browse/FWF-4820
Issue Type: BUG/ FEATURE
Changes
PR Type
Bug fix, Enhancement
Description
Fix attribute filter modal effect and share options
Enhance attribute filter save and list update
Improve attribute filter dropdown items and actions
Adjust task list defaults and table behavior
Changes walkthrough 📝
5 files
Fix filter effect dependency and include metadataUpdate attribute filter list after saveImprove dropdown items and edit actionsRefine default filter selection and page limitAdd roles column support in table1 files
Adjust save filter tab display condition1 files
Change last column text alignment