Skip to content

Follow-up for new member list

Alex requested to merge fix-member-list-problems into master

Part of #1159 (closed)

What does this MR do?

Fixes some problems in the new admin mode of the working group member list:

  • a new member is sorted in alphabetically instead of being added to the end of the list
  • when searching for users, the suggestion box only shows those who are not yet in the group
  • adding and removing is limited to working groups. Without this, the REST endpoint could be used for regions, too. (see https://foodsharing.de/?page=bezirk&bid=734&sub=forum&tid=154358&pid=884691#post-884691)
  • the returned JSON format of the user is normalised with the Profile class that we use in other places, too. This fixes the problem that the profile picture is not shown when a user is added.

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

quite sure, but not absolutely

How to test

You can only test the first two points from above:

  1. Checkout branch locally
  2. Login as userbot or userorga
  3. Go to the member list of a group that you can manage
  4. Add a new user -> the user should be inserted at the correct position in the list
  5. Type the name of that user into the search field again -> you should not see it in the suggestions anymore

The third point could be tested by changing the id in the Rest URL to a region, but I'm quite sure that it works. The fourth point will only show a difference for users who have uploaded their profile picture before the new upload API. Thus, it can't be tested in the dev setup.

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
  • used "state:" labels to track this MR's state until it was beta tested
  • 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 (only on beta)
  • 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

Merge request reports