Skip to content

Fix basket lifetime

Martin requested to merge 1243-martincodes-misleading-basket-lifetime into master

Closes #1243 (closed)

What does this MR do?

Before this MR, only the days, month and year was compared with the current date of the maintainance date.

It was possible to create a basket at 2022-06-01 11 pm with a lifetime of 24 hours, but it would be marked as deleted at 2022-06-02 12am (difference with hours: 1 but without hours: 1 day) because the maintainance script runs.

Now the hours, minutes and seconds are compared too.

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

Very sure.

Links to related issues

How to test

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

Die Lebensdauer von Warenkörben wird jetzt wirklich berechnet, vorher wurden die Stunden und Minuten nicht verglichen. Es war möglich, einen Korb um 23 Uhr mit einer Lebensdauer von 1 Tag hinzuzufügen, aber er würde am nächsten Tag um 12 Uhr gelöscht werden.

Closes #1243 (closed)

Edited by Martin

Merge request reports