Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Include PPE product types in free text query #1045

Merged
merged 1 commit into from Jul 9, 2020

Conversation

jwalgran
Copy link
Contributor

@jwalgran jwalgran commented Jul 9, 2020

Overview

Allows searching for a specific type of PPE product using the simplest possible implementation. Can be combined with the ppe filter for more precision searching.

Connects #1031

Demo

Screen Shot 2020-07-09 at 10 00 31 AM

Testing Instructions

These instructions assume resetdb has been run.

  • Download and unzip ppe.csv.zip
  • Log in as c7@example.com, browse http://localhost:6543/contribute and submit ppe.csv
  • Fully process the file by running commands on the vagrant VM
    • ./scripts/manage batch_process --list-id 16 --action parse
    • ./scripts/manage batch_process --list-id 16 --action geocode
    • ./scripts/manage batch_process --list-id 16 --action match
  • Free-text search for "gloves" and verify that 3 facilities are returned, 2 that match "gloves" in the name and 1 that matches "gloves" in the PPE product types.
  • In a separate browser session log in as c1@example.com, browse http://localhost:8081/admin/waffle/switch/4/change/, uncheck the "Active" box on the PPE switch and click "Save an continue editing."
  • In the original browser session browse http://localhost:6543/ and verify that the label on the free text search field has changed. Search for "gloves" and verify that only the 2 name matches are returned.

Checklist

  • fixup! commits have been squashed
  • CI passes after rebase
  • CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines

@jwalgran jwalgran requested a review from mmcfarland July 9, 2020 17:04
@rajadain rajadain self-assigned this Jul 9, 2020
@rajadain
Copy link
Contributor

rajadain commented Jul 9, 2020

I ingested the list as C7:

image

But searching for "gloves" only results in two facilities:

image

Made sure I'm on the right branch:

*   462f869 - (HEAD -> feature/jcw/search-ppe-types) Merge branch 'develop' into feature/jcw/search-ppe-types (22 minutes ago) <Terence Tuhinanshu>
|\
| *   a2dff70 - (origin/develop, origin/HEAD, develop) Merge pull request #1044 from open-apparel-registry/feature/jcw/search-ppe (31 minutes ago) <Justin Walgran>
| |\
* | | 57c57aa - (origin/feature/jcw/search-ppe-types) Include PPE product types in free text query (33 minutes ago) <Justin Walgran>
| |/
|/|
* | a5431a4 - Update CHANGELOG (50 minutes ago) <Justin Walgran>
* | 7207e7f - Conditionally show the PPE param in Swagger docs based on switch (50 minutes ago) <Justin Walgran>
* | cae3bc3 - Add PPE checkbox to the search options and connect to query endpoint (50 minutes ago) <Justin Walgran>
* | e779cbc - Add argument to facility query API to search for PPE producers (50 minutes ago) <Justin Walgran>
|/
*   72a3fe8 - Merge pull request #1041 from open-apparel-registry/feature/jcw/show-ppe (2 hours ago) <Justin Walgran>

@rajadain
Copy link
Contributor

rajadain commented Jul 9, 2020

Ah the switch was not active. I turned it on, and now see the correct facilities:

image

Copy link
Contributor

@rajadain rajadain left a comment

Choose a reason for hiding this comment

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

+1 tested, working well!

@rajadain rajadain assigned jwalgran and unassigned rajadain Jul 9, 2020
Allows searching for a specific type of PPE product using the simplest possible
implementation. Can be combined with the `ppe` filter for more precision
searching.
@jwalgran jwalgran force-pushed the feature/jcw/search-ppe-types branch from 57c57aa to f762c55 Compare July 9, 2020 17:49
@jwalgran
Copy link
Contributor Author

jwalgran commented Jul 9, 2020

Thanks for the review.

@jwalgran jwalgran merged commit 6156bb7 into develop Jul 9, 2020
@jwalgran jwalgran deleted the feature/jcw/search-ppe-types branch July 9, 2020 18:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants