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

dm-5019 prevent duplication of va_facilities upon import #1086

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PhilipDeFraties
Copy link
Collaborator

JIRA issue link

https://agile6.atlassian.net/browse/DM-5019

Description - what does this code do?

adds va_facilities:facilities_import_check task:

  • pulls up-to-date facilities data from the source file and compares with va_facilities in db by official_station_name and prints out data of potential duplicate to console

updates va_facilities:create_or_update_va_facilities and :delete_non_current_va_facilities tasks:

  • both tasks now create and output file only if there is pertinent data resulting from the tasks, otherwise prints message to console indicating there is no pertinent data.

Testing done - how did you test it/steps on how can another person can test it

  1. reset local db with bundle exec rails dm:reset_up
  2. Run the new task: bundle exec rails va_facilities:facilities_import_check
  3. Verify a message is printed to the console indicating no potential facility duplicates were found
  4. In rails console, update a few facilities' station_numbers
  5. Run the new task: bundle exec rails va_facilities:facilities_import_check
  6. Verify a message is printed to the console indicating potential duplicates were found and printed to an output file
  7. Verify the file contains data pertaining to the potential duplicates VaFacility already in the db as well as the data for the new potential records.
  8. rest the db
  9. run the other tasks: bundle exec rails va_facilities:create_or_update_va_facilities and bundle exec rails va_facilities:delete_non_current_va_facilities and verify a message is printed to the console indicating no output file was creatd
  10. Go through the QA steps for the facilities importer tasks from the recent update pr

Screenshots, Gifs, Videos from application (if applicable)

Link to mock-ups/mock ups (image file if you have it) (if applicable)

Acceptance criteria

  • [ ]

Definition of done

  • Unit tests written (if applicable)
  • e2e/accessibility tests written (if applicable)
  • Events are logged appropriately
  • Documentation has been updated, if applicable
  • A link has been provided to the originating JIRA issue
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs

pulls up-to-date facilities data from the source file and compares with va_facilities in db by official_station_name and prints out data of potential duplicate to console and output file
…urrent_va_facilities tasks to create an output file conditionally
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.

1 participant