Skip to content

fix(maintenance): fixed data type error in SQLs for sending warnings to store...

Robert Nönnig requested to merge 969-fix-nightly-fetch-warnings into master

Closes #969 (closed)

What does this MR do?

In the Maintenance script warnings are sent out to store managers if slots are unoccupied within the next two days. However no warnings are currently sent out even if there are such unoccupied slots. This MR fixes the SQL scripts related to this functionality.

How confident are you it won't break things if deployed?

High confidence. No php statements were added, only moved from prepared parameters to the query string. So the only problem that could arise would be if the storeIds array would be empty. But I tested that case and the script ran fine even in that case.

Links to related issues

This is currently blocking #891 (closed)

How to test

  1. Checkout branch locally
  2. Login as store manager
  3. Make sure there is a recurring pick-up date later today or tomorrow
  4. Make sure a store manager is assigned to the store
  5. Start the maintenance script by executing:
./scripts/docker-compose run --rm --no-deps app php -f run.php Maintenance daily
  1. Verify that there will an INFO message like this: "[INFO] send 2 warnings..."

There is also a test that was extended that covers the above:

./scripts/test tests/cli/MaintenanceCept.php

Screenshots (if applicable)

This is a backend change only

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • set a "for:" label to indicate who will be affected by this change
  • added to the next milestone (see https://gitlab.com/foodsharing-dev/foodsharing/-/milestones, unless it has a "for:Dev" label)
  • added an entry to CHANGELOG.md
  • added a short text that can be used in the release notes
  • Once your MR has been merged, you are responsible to create a testing issue in the Beta Testing forum: https://foodsharing.de/?page=bezirk&bid=734&sub=forum. Please change the MRs label to "state:Beta testing".
    • Consider writing a detailed description in German.
    • Describe in a few sentences, what should be tested from a user perspective.
    • Also mention different settings (e.g. different browsers, roles, ...) how this change can be tested.
    • Be aware, that also non technical people should understand.

Release notes text in German

Warnungs-E-Mails werden wieder an Betriebsverantwortliche verschickt, wenn sich für die nächste Abholung noch niemand eingetragen hat

Edited by Robert Nönnig

Merge request reports