Skip to content

Draft: Keep given bananas and first name, when a user is deleted

Jörg S. requested to merge update-deleteFoodsaverProcess into master

Closes #1864

What does this MR do?

Modifies the deleteFoodsaver() routine in such a way that given bananas will no longer be deleted (but received ones of course will) when users are deleted and their first name will also be retained.

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

quite

Links to related issues

  • https://beta.foodsharing.de/region?bid=2296&sub=forum&tid=234570
  • and discussed often in the past, the consent or majority decision to keep given bananas was always as you can see in the above thread (see thumbs in Martins comment) and it is logical, a trust banana was always mentioned as a kind of positive rating of the affected user (the appropriate database table is also called fs_rating), so you literally "give" the banana away to the other user like a award, trophy or gift and write some words like in a kind of guest book or post card. He owns it from now on.

How to test

  1. Use two test foodsavers A and B from which at least one can be deleted
  2. As A give a trust banana to B and post sth. in a forum
  3. As B give a trust banana to A and post sth. in a forum
  4. Delete either A or B and check how the bananas and forum posts are affected

Checklist

  • minor change
  • 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 in the release notes to /release-notes/YYYY-MM.md
Edited by Alex

Merge request reports