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

Fixes an export win pagination bug #6585

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Conversation

paulgain
Copy link
Contributor

@paulgain paulgain commented Mar 6, 2024

Description of change

When posting to an endpoint using Axios any value that is null in the payload is stripped out. This is problematic for export wins paginated pages.

When we want to fetch export wins the following payloads apply:

  1. Rejected { confirmed: false}
  2. Won { confirmed: true}
  3. Sent { confirmed: null}

The last API call ultimately fails in the sense no filter is applied.

The temporary fix is to cast null to a string "null". The proper fix is to create an Axios interceptor which we don't have time for - tech-debt!

Checklist

  • Has the branch been rebased to main?
  • Automated tests (Any of the following when applicable: Unit, Functional or End-to-End)
  • Manual compatibility testing (Browsers: Chrome, Firefox, Edge, Safari)

When posting to an endpoint using Axios any value that is null in
the payload is stripped out. This is problematic for export wins
paginated pages.

1. When we want to fetch rejected wins we use the payload { confirmed: false}
2. When we want to fetch won wins we use the payload { confirmed: true}
3. When we want to fetch sent wins we use the payload { confirmed: null}

The last API call ultimately fails.

The temporary fix is to cast null to a string "null". The proper fix is
to create an axios intereceptor which we don't have time for - tech-debt!
@paulgain paulgain requested a review from a team as a code owner March 6, 2024 13:54
Copy link

cypress bot commented Mar 6, 2024

Passing run #51667 ↗︎

0 24 0 0 Flakiness 0

Details:

Fixes an export win pagination bug
Project: data-hub-frontend Commit: b78cc2899f
Status: Passed Duration: 02:10 💡
Started: Mar 6, 2024 1:59 PM Ended: Mar 6, 2024 2:02 PM

Review all test suite changes for PR #6585 ↗︎

@paulgain paulgain merged commit bb60d98 into main Mar 6, 2024
16 checks passed
@paulgain paulgain deleted the fix/export-win-send-pagination branch March 6, 2024 16:00
chopkinsmade pushed a commit that referenced this pull request Mar 6, 2024
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.

3 participants