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

Use sites scanned by broker instead of number of scans in the UI #1903

Merged

Conversation

jotaemepereira
Copy link
Collaborator

@jotaemepereira jotaemepereira commented Nov 29, 2023

Task

https://app.asana.com/0/1204006570077678/1206052775622166/f

Description

We are currently sending currentScans and totalScans to the UI with the actual values of what’s happening. The UI shows sites scanned, which is different from total scans.

For example, if you add two names and one address, let's say we have only Verecor and Veriforia as brokers. We will send totalScans = 4 (two scans on Verecor, two scans on Veriforia)

Now we send the scans by broker. In the example above, we would show totalScans = 2 (we only count the brokers Vercor and Veriforia).

One thing is that we will count a broker as ‘scanned’ if one of the profile queries for a particular broker has a scan date. The reason is that if we wait for all profile queries for a particular broker to finish to mark it as scanned, the user could see matches for more than one broker even when the count is one.

Example of the above:

  • Broker Profile query 1 (John Doe, broker#1)
  • Broker Profile query 2 (John Doe, broker#2)
  • Broker Profile query 3 (Sean Doe, broker#1)
  • Broker Profile query 4 (Sean Doe, broker#2)

If the first queries return matches, the count will be 1..2, and we will show matches for two brokers which could confuse the user.

NOTE: This PR also fixes a bug where if there were multiple matches for the same broker profile query, it would only show one.

Steps to test

  1. Start PIR from scratch (delete all data)
  2. Create a profile with different names and addresses
  3. The UI should show 1…to the amount of brokers (atm is 17)

Test matches are correct

  1. Start PIR from scratch (delete all data)
  2. Create a profile with different names and addresses, search a profile that has multiple profiles for the same query
  3. The UI should show all the matches found

Copy link
Collaborator

@Bunn Bunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tried many different combinations of names and addresses and the number there looks good. well done

@jotaemepereira jotaemepereira merged commit 7813999 into dbp/waitlist-release-additions Nov 30, 2023
16 checks passed
@jotaemepereira jotaemepereira deleted the juan/dbp/fix-total-scans-number branch November 30, 2023 12:46
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