pulibrary / lib_jobs

Enterprise Services batch processing tasks. Rails 7 Ruby 3.1.0
4 stars 0 forks source link

[lc call slips] keyword matching is thrown off by a trailing punctuation #754

Closed sandbergja closed 3 months ago

sandbergja commented 3 months ago

Expected behavior

If a selector has keyword "westbrook" configured, it should match a title where the 100$a is "Westbrook, Catherine".

Actual behavior

It does not match

Steps to replicate

  1. On staging, run bundle exec rake lib_jobs:create_csv_for_selector_comparison
  2. Find an author's surname that has some trailing punctuation
  3. Create a branch with that surname in a selector's keywords (without the punctuation)
  4. Deploy your branch to staging
  5. Run cd /opt/lib-jobs/current && bundle exec rake lib_jobs:process_newly_cataloged_records
  6. Find your selector's email in mailcatcher
  7. Note that the record was not added to the selector's email.

Impact of this bug

Selectors may miss out on titles that are relevant to them.