CanΒ΄t update registrations

Created on 14 December 2023, 11 months ago

Problem/Motivation

When I want to change a registration, I get to the form view, but when I save the changes, they are not applied. However, no error message appears!

πŸ› Bug report
Status

Active

Version

2.0

Component

Recurring Events Registration (Submodule)

Created by

πŸ‡©πŸ‡ͺGermany trichers

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @trichers
  • Issue was unassigned.
  • πŸ‡¨πŸ‡¦Canada endless_wander

    @trichers can you provide more detailed information about how to reproduce the issue? Have you tried using simplytest.me with Recurring Events module installed to see if you can reproduce the image from a fresh installation?

  • πŸ‡ΊπŸ‡ΈUnited States owenbush Denver, CO

    Are you trying to change a registrant as an administrator, or as the owner of the registration? If the owner, are you doing this anonymously (using the URL with the UUID in it), or as a logged in user?

  • πŸ‡©πŸ‡ͺGermany trichers

    @endless_wander In a new installation with version Drupal 9.5.11 the editing works as desired. Unfortunately not in three existing Drupal 9.5.11 installations. I have already activated the debug mode and also read out PHP errors, but cannot detect anything.

    @owenbush I tried it as admin and anonymously

  • πŸ‡ΊπŸ‡ΈUnited States owenbush Denver, CO

    I've so far been unable to recreate this issue.

    When you submit the form to edit a registration, does the page refresh at all? If not, do you see any browser console errors?

  • πŸ‡©πŸ‡ͺGermany trichers

    In the meantime I have realised that I can't change registrations from today. Registrations in the future can be changed.

  • πŸ‡ΊπŸ‡ΈUnited States owenbush Denver, CO

    It's been a while since this code was written, but it was deliberate to not allow changing of registrations for past events.

    I don't recall why exactly, though.

    But if the event's registration has closed, or the event is in the past, or there's no more space, updating registrations is not permitted.

    Now I can't remember why, and would be interested to know if people felt this was the wrong approach.

    /me wished I had commented the code when I wrote it with a reason why.

  • πŸ‡¨πŸ‡¦Canada endless_wander

    @owenbush, I can see from my client's perspective they wouldn't want people intentionally or accidentally messing with registrations after an event has passed as they use that info for their event statistics.

    I could see them wanting to update registrants when an event is closed, however, as a registrant may contact them directly to say they can't come, etc.

  • πŸ‡ΊπŸ‡ΈUnited States owenbush Denver, CO

    I'm wondering if it may be worth having another permission to allow someone to modify a registration, even if the current restrictions are kept.

  • πŸ‡©πŸ‡ͺGermany trichers

    @endless_wander @owenbush

    I have added an extra field for internal notes to the registrations. I would also like to make notes there after the event, which I will need for later evaluations. Would it be possible to set the permissions so that subsequent changes to the registrations are possible?

    @owenbush And by the way, many thanks for your very good work!

  • Status changed to Needs review 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States owenbush Denver, CO

    Hi @trichers, your use case is certainly valid. I thought about adding a permission for being able to edit registrants of event instances where registration was closed, but the logic is also used for adding registrations. So I opted instead for a new permission 'administer all registrants' which allows basically any registrant operation. So users with that permission can add/edit/delete any registrant regardless of if they are in the past etc.

    So in order for someone to be able to add internal notes after an event the user's role will need to be assigned the new permission.

    I've added the code to a merge request, and here's a patch link if you want to test it:

    https://git.drupalcode.org/project/recurring_events/-/merge_requests/87....

  • First commit to issue fork.
  • Pipeline finished with Skipped
    12 days ago
    #329333
  • πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia

    Thanks @trichers for the report, @chrisla for the feedback, and @owenbush for the fix!

  • πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia
Production build 0.71.5 2024