open_social
open_social copied to clipboard
Issue #3306568 by vnech: Add ability for event managers to show/hide enrolees
Problem
In the event node type we have the enrollments page and block which are available for verified (authenticated) users. Sometimes is useful to not show for user other participants who takes part in the event to avoid some side impact for her/his decision regarding participating.
Solution
- Add a new field "Hide enrollments" allows to show/hide enrollers in the event.
Issue tracker
- https://www.drupal.org/project/social/issues/3306568
- https://getopensocial.atlassian.net/browse/PROD-21834
Theme issue tracker
N/A
How to test
- [x] Login as SM
- [x] Create an event
Event #1
- [x] Add a few participants (enrolles)
- [x] Login as LU
- [x] Visit event
Event #1
page- [x] EB: LU should be able to see the "Enrollments" tab and visit this page as well
- [x] Login as SM
- [x] Edit the event
Event #1
and enable "Hide enrollments" option - [x] Login as LU
- [x] Visit event
Event #1
page- [x] EB: LU should not be able to see the "Enrollments" tab and visit this page as well
Definition of done
Before merge
- [ ] Code/peer review is completed
- [ ] All commit messages are clear and clean. If applicable a rebase was performed
- [ ] All automated tests are green
- [ ] Functional/manual tests of the acceptance criteria are approved
- [ ] All acceptance criteria were met
- [ ] New features or changes to existing features are covered by tests, either unit (preferably) or behat
- [ ] Update path is tested. New hook_updates should respect update order, right naming convention and consider hook_post_update code
- [ ] Module can be safely uninstalled. Update/implement hook_uninstall and make sure that removed configuration or dependencies are removed/uninstalled
- [ ] This pull request has all required labels (team/type/priority)
- [ ] This pull request has a milestone
- [ ] This pull request has an assignee (if applicable)
- [ ] Any front end changes are tested on all major browsers
- [ ] New UI elements, or changes on UI elements are approved by the design team
- [ ] New features, or feature changes are approved by the product owner
After merge
- [ ] Code is tested on all branches that it has been cherry-picked
- [ ] Update hook number might need adjustment, make sure they have the correct order
- [ ] The Drupal.org ticket(s) are updated according to this pull request status
Screenshots
A new option on event add/edit page:

The main event page when "Hide enrollments" is disabled:

The main event page when "Hide enrollments" is enabled:

Release notes
- Add ability to hide enrollments on events
- Add node bundle class for event node type
Change Record (https://www.drupal.org/node/3307141)
- Introduce node bundle class for
event
node type (see) -\Drupal\social_event\Entity\Node\Event
- The sevice
social_event.enroll
is deprecates as main functionality was moved to event node bundle class\Drupal\social_event\Entity\Node\Event
Translations
N/A
Thanks for contributing towards Open Social! A maintainer from the @goalgorilla/maintainers group might not review all changes from all teams/contributors. Please don't be discouraged if it takes a while. In the meantime, we have some automated checks running and it might be that you will see our comments with some tips or requests to speed up the review process. :blush:
@nechai , great work here, I loved the way you added the access checks and is using new Drupal 9.3 features, great documentation including release notes and change records.
Only missing feature are tests, but this is already aligned that we will do in a new branch
🍒 picked to 11.5.x