Skip to content
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

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

ibolton336
Copy link
Member

@ibolton336 ibolton336 commented Jul 12, 2023

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

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (773623b) 44.08% compared to head (c903a38) 44.08%.

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           
Flag Coverage Δ
unitests 44.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ntities/components/identity-form/identity-form.tsx 56.45% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ibolton336 ibolton336 marked this pull request as ready for review July 12, 2023 18:15
@ibolton336 ibolton336 changed the title [WIP]- Fix Jira wave status post update on jira side. 🐛 Fix aggregated wave status. Reflect all states in Jira instance Jul 12, 2023
@@ -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]),
Copy link
Collaborator

@mturley mturley Jul 12, 2023

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!

Copy link
Member

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 !== "");
Copy link
Member

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>
@ibolton336 ibolton336 merged commit 066a5ec into konveyor:main Jul 13, 2023
ibolton336 added a commit to ibolton336/tackle2-ui that referenced this pull request Jul 13, 2023
…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>
ibolton336 added a commit that referenced this pull request Jul 13, 2023
…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>
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.

Migration waves aggregated status value shows "In Progress" although there are no tickets
3 participants