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: Handle unique file list correctly #2328

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Oct 18, 2023

What's the problem?

  • When constructing a FileList for display to the user, we want this to only contain unique files (by name)
  • We're experiencing a bug where a file is missing from the FileList
    • There are two FileTypes with the same name
    • Only one of their conditions is met
    • Neither appear in the final list ❌
  • Described in detail with example flow here on OSL Slack

What's the cause?

  • The unique list of file names we maintain does not check if the file has been added or not to the FileList

What's the solution?

  • Check if a file is added by the populateFileList() function
  • Only count it as a unique file if added to our FileList

Demo

Broken flow on prod - https://editor.planx.uk/testing/upload-and-label-recommended-test
Fixed flow on pizza - https://2328.planx.pizza/testing/upload-and-label-recommended-test

@github-actions
Copy link

github-actions bot commented Oct 18, 2023

Removed vultr server and associated DNS entries

@DafyddLlyr
Copy link
Contributor Author

image

August has given this the green light 🟢

@DafyddLlyr DafyddLlyr merged commit f7b84f3 into main Oct 20, 2023
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/recommend-required-duplicate-file-logic branch October 20, 2023 08:13
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.

2 participants