Closed annikaLiving closed 2 years ago
When you first go to datasets you get a total number of visible datasets listed. When selecting all items in a facet (like Record Status) you can get a different number. Happens when logged in, not sure about anonymous.
Sheila to go through and post steps to reproduce (logged in and not logged in)
I have done this in Toyger:
Select "Browse thousands of government datasets" page states 3080 datasets found
Filter Search Result: Download Permissions - select all page states 3005 datasets found
Reset - Resource Data Types - select all page states 3059 datasets
Appears to be responding better, last time I checked the totals could also be higher than the original count. Now it appears there may simply be datasets that contain NULL? Which should not be, as mandatory fields should not be NULL.
Now it appears there may simply be datasets that contain NULL? Which should not be, as mandatory fields should not be NULL.
@TerryLanktree, although I'm unsure if the original issue is still present, and will defer to Sheila for that, yes, you're correct that null values (essentially) are the culprit in the examples you provided. That being said, I don't consider the resource data types behaviour to be a defect. As for your download permissions example, I suggest we discuss that further; that one appears to be a more nuanced data issue. More detail on the reasoning behind these conclusions follows.
Resource Data Types query with all facet values selected - 3058/3080 results
The 21 records absent from this facet are all datasets that have zero resources attached to them in toyger. There are numerous ways this could have happened. I've listed a few here.
In any event, for those datasets there is no resource type value to query. This effectively makes the resource type null, as you suggest, but it's not because a mandatory field is missing from resources, but rather because there's no resources for the mandatory field to be attached to.
An example of one such dataset can be found here:
An example of a dataset (also in that group of 21) which has a resource attached in prod but not in toyger is here:
These datasets will appear in the results for a search with no filters applied, but they will not appear in a search if all resource data type facets are selected.
Download Permissions query with all facet values selected - 3005/3080 results
There are 75 records not covered by this facet's set of values, and indeed, there are 75 records in toyger for which the Download Permissions field is unavailable in the solr index. It turns out that even though these datasets technically have that field associated to them in the database, (at least from the migration script's perspective,) the key/value pair for these specific records is marked as deleted, so it's not displayed or included in API calls (it's null). It was probably deleted for these records intentionally, because the download permissions field is not applicable to resources that are not downloadable. This includes web apps, for example.
One suggestion might be to add an N/A value for records like these, but I hesitate to do a bulk update without very clear criteria. It may be worth discussing how to handle this with the team, now or later (post MVP?)
The 75 records missing from this facet are listed below, along with their download audience field value pre-deletion.
Update: This is acceptable. Sheila to retest and then close if not needed.
Testing:
NOTE: when filtering either Resource Data Types and Download Permissions, the number of datasets are less than no filtering applied.
NOTE: When logged in this fails the threshold of the Filtered list being <= Filtered list for Record Status. Not sure why a filtered list on one attribute would bring back more records than the unfiltered list. This only happens for Record Status.
This is technically a production defect that's being exposed by a new feature.
@TerryLanktree to review further against production and the impacts.
Toyger Testing (Explore Datasets):
PASSED
Toyger Testing (Explore by Groups - BC Government API Registry):
PASSED
Toyger Testing (Explore by Organization - Minitry of Health > British Colubmia Vital Statistices Agency)):
PASSED
BetaTesting (Explore Datasets):
Not logged in - 3119 datasets found Not logged in and filtered by Pending Archive = 20 datasets found with 1 filter applied Not logged in and filter by Published = 3099 datasets found with 1 filter applied Not logged in and filtered by Published and Pending Archive = 3099 datasets found with 2 filters applied Logged in with no roles - 3343 datasets found Logged in and filtered by Pending Archive = 26 datasets found with 1 filter applied Logged in and filter by Published = 3317 datasets found with 1 filter applied 8.. Logged in and filtered by Published and Pending Archive = 3343 datasets found with 2 filters applied Logged in with Ministry Level Admin Role - 3415 datasets found Logged in with Ministry Level Admin Role and filtered by Draft - 5 datasets found with 1 filter applied Logged in with Ministry Level Admin Role and filtered by Pending Archive = 26 datasets found with 1 filter applied Logged in and filter by Published = 3317 datasets found with 1 filter applied Logged in and filter by Archived = 67 datasets found with 1 filter applied Logged in and filtered by all four statuses = 3415 datasets found with 4 filters applied PASSED
Beta Testing (Explore Dataset Groups - BC Government API Registry):
Logged in with Ministry Level Admin Role @ Ministry Level - 11 datasets found Logged in with Ministry Level Admin Role @ Ministry Level and filtered by Draft - 0 datasets found with 1 filter applied Logged in with Ministry Level Admin Role @ Ministry Level and filtered by Pending Archive = 0 datasets found with 1 filter applied Logged in with Ministry Level Admin Role @ Ministry Level and filter by Published = 11 datasets found with 1 filter applied Logged in with Ministry Level Admin Role @ Ministry Level and filter by Archived = 0 datasets found with 1 filter applied Logged in with Ministry Level Admin Role @ Ministry Level and filtered by all four statuses = 11 datasets found with 4 filters applied PASSED
Beta Testing (Explore by Organization - Minitry of Health > British Columbia Vital Statistics Agency)):
Logged in with Ministry Level Admin Role of Different Organization - 2 datasets found Logged in with Ministry Level Admin Role of Different Organization and filtered by Draft - 0 datasets found with 1 filter applied Logged in with Ministry Level Admin Role of Different Organization and filtered by Pending Archive = 0 datasets found with 1 filter applied Logged in with Ministry Level Admin Role of Different Organization and filter by Published = 2 datasets found with 1 filter applied Logged in with Ministry Level Admin Role of Different Organization and filter by Archived = 0 datasets found with 1 filter applied Logged in with Ministry Level Admin Role of Different Organization and filtered by all four statuses = 2 datasets found with 4 filters applied PASSED
Assigned as an editor of DataBC Program:
Should happen: