-
Notifications
You must be signed in to change notification settings - Fork 40
ISSUE #5299 - Ticket Filters in Tabular View #5539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ISSUE_5545
Are you sure you want to change the base?
Conversation
…l filters are set
…m the selected template
…plates were not fetched in time)
… landing on details card
...nents/viewer/cards/cardFilters/filtersSelection/tickets/ticketFiltersSelection.component.tsx
Outdated
Show resolved
Hide resolved
frontend/src/v5/ui/routes/dashboard/projects/tickets/ticketsContent.component.tsx
Show resolved
Hide resolved
frontend/src/v5/ui/routes/viewer/ticketFiltersSetter/ticketFiltersSetter.component.tsx
Outdated
Show resolved
Hide resolved
frontend/src/v5/ui/routes/dashboard/projects/tickets/ticketsTable/ticketsTable.component.tsx
Outdated
Show resolved
Hide resolved
...end/src/v5/ui/routes/dashboard/projects/tickets/ticketsList/slides/ticketSlide.component.tsx
Outdated
Show resolved
Hide resolved
frontend/src/v5/ui/controls/inputs/arrayFieldContainer/arrayFieldContainer.styles.ts
Show resolved
Hide resolved
…ct on ticket takes from model it belongs to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces ticket filter functionality to the tabular view, ensuring that the properties selection list is updated based on applied filters and integrates smoothly with existing ticket table updates.
- Added ticket filters in tabular view with corresponding filter pill UI and collapsible filter bar
- Updated selectors, sagas, and components to support filtering across both container and federation models
- Refactored and cleaned up related styles and helper functions
Reviewed Changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
frontend/src/v5/ui/routes/dashboard/projects/tickets/ticketsTable/newTicketMenu/useSelectedModels.ts | Introduces a new hook to conditionally select model IDs based on viewer context |
frontend/src/v5/ui/routes/dashboard/projects/tickets/ticketsList/slides/ticketSlide.component.tsx | Minor cleanup by removing an extra blank line |
frontend/src/v5/ui/routes/dashboard/projects/tickets/ticketsContent.component.tsx | Passes an extra parameter to fetchTemplates for enhanced detail fetching |
frontend/src/v5/ui/routes/dashboard/projects/tickets/tickets.styles.ts | Renames container component and adjusts spacing along with removing unused chip styling |
frontend/src/v5/ui/routes/dashboard/projects/tickets/ticketsContent.component.tsx | Updates API usage in saga to support multiple model IDs |
Multiple UI components and helpers | Adjust imports and update logic to support new filter functionality and models selection |
Comments suppressed due to low confidence (1)
frontend/src/v5/store/tickets/card/ticketsCard.sagas.ts:65
- The code calls isFederation as a function (isFederation(modelId)), but isFed is obtained from a selector and likely returns a boolean instead of a function. Update the logic to check the boolean value directly (e.g. use (isFederation ? API.Tickets.fetchFederationTickets : API.Tickets.fetchContainerTickets)).
const fetchModelTickets = await isFederation(modelId) ? API.Tickets.fetchFederationTickets : API.Tickets.fetchContainerTickets;
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Round 1 testing is complete. Here is the test summary report with bug report inside.
@@ -143,9 +133,10 @@ export const TicketsTable = () => { | |||
return pathname + (ticketId ? `?ticketId=${ticketId}` : ''); | |||
}; | |||
|
|||
useSetDefaultTicketFilters([selectedTemplate]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I think it should be getNonCompletedTicketFilters
but as a hook.
useSetDefaultTicketFilters
currently uses the routing for the viewer.
So rename getNonCompletedTicketFilters
to useSetDefaultTicketFilters
Rename useViewerTicketFilterParams
to useBindTicketFiltersData
make it receive any param like the one from needed in the tickets table to reuse that in both places. Add any necessary logic (like the filtersInitialised) the idea is to have a hook that orchestrates how tickets filters data is fetched.
and rename
useSetDefaultTicketFilters
to useViewerTicketFilterParams
const [groupBy,, setGroupByParam] = useSearchParam('groupBy'); | ||
const [groupByValue,, setGroupByValue] = useSearchParam('groupByValue'); | ||
const [containerOrFederation,, setContainerOrFederation] = useSearchParam('containerOrFederation'); | ||
const models = useSelectedModels(); | ||
|
||
const [filtersInitialised, setFiltersInitialised] = useState(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes #5299
Description
Acceptance Criteria