-
Notifications
You must be signed in to change notification settings - Fork 43
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
🐛 Fix aggregated wave status. Reflect all states in Jira instance #1124
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #1124 +/- ##
=======================================
Coverage 44.08% 44.08%
=======================================
Files 177 177
Lines 4500 4500
Branches 1008 1008
=======================================
Hits 1984 1984
Misses 2505 2505
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
@@ -35,7 +36,8 @@ export const useFetchMigrationWaves = () => { | |||
queryFn: getMigrationWaves, | |||
refetchInterval: 5000, | |||
onError: (error) => console.log("error, ", error), | |||
onSuccess: () => queryClient.invalidateQueries([TicketsQueryKey]), | |||
onSuccess: () => | |||
queryClient.invalidateQueries([TicketsQueryKey, TrackersQueryKey]), |
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.
@ibolton336 does this behave as expected? I think the invalidateQueries array param is intended to be elements that have to all be part of a compound (array) queryKey to invalidate that query (via partial matching), so this should probably be two separate invalidateQueries
calls for tickets and trackers. Confusing API!
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.
Same kind of discussion as https://github.com/konveyor/tackle2-ui/pull/1098/files/83a6edbd8d8db959d1aecd53e1901d213c4cb13d#r1259920085.
"Quick" fix is to have all target queries have a single shared element in the key array and then partial matching do its thing.
FWIW, debugging in to react-query is pretty easy.
return matchingTicket.status; | ||
} else return ""; | ||
}) | ||
.filter((ticketStatus) => ticketStatus !== ""); |
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.
.filiter(Boolean)
will remove anything that is falsey ("", 0, false, undefined, null)
Signed-off-by: ibolton336 <ibolton@redhat.com>
…nveyor#1124) Resolves https://issues.redhat.com/browse/MTA-877 Resolves konveyor#974 konveyor#911 - Adds Completed status - Adds In Progress status - Filters out empty status from derived status calculation. This could mean the issue has been deleted from the underlying JIRA instance OR that the Jira ticket is in the process of being created. We have no way of knowing how to interpret empty string, so this filters it out which gives us a more accurate representation of aggregated status. - Add TODO for info text around auth types for JIRA credential creation - Remove Created By field in identity page table - Fixes stale tickets data in migration waves table by mounting the tickets query Signed-off-by: ibolton336 <ibolton@redhat.com>
…completed status (#1132) … (#1124) Resolves https://issues.redhat.com/browse/MTA-877 Resolves #974 #911 - Adds Completed status - Adds In Progress status - Filters out empty status from derived status calculation. This could mean the issue has been deleted from the underlying JIRA instance OR that the Jira ticket is in the process of being created. We have no way of knowing how to interpret empty string, so this filters it out which gives us a more accurate representation of aggregated status. - Add TODO for info text around auth types for JIRA credential creation - Remove Created By field in identity page table - Fixes stale tickets data in migration waves table by mounting the tickets query Signed-off-by: ibolton336 <ibolton@redhat.com>
Resolves https://issues.redhat.com/browse/MTA-877
Resolves #974 #911