Problem/Motivation

Entity Registration works great! I have set the permissions to allow users to cancel their own registration. This works well until I found that people can cancel their registrations on the day of event and even after the event. This allows them not to be seen as a "no-show" because the system shows they cancelled (even though they cancelled after the event).

Is there a way to limit when someone can cancel their own registration?

Ideally for my use case, I would like to allow them to cancel up until 5 days before the event. After that, I do not wish them to cancel as it will alter use cases. In addition, if there's a waiting list, that promotes someone to normal registration with little time to make arrangements. That also causes confusion.

Steps to reproduce

Set up Entity Registration, change permissions to allow user to cancel registration.

Thanks for all your help!!!

Michael

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

wattdesigns created an issue. See original summary.

wattdesigns’s picture

PS..... it would also work so that you can only change Status during the period set up in the registration settings for opening and closing registrations.

john.oltman’s picture

Version: 3.4.3 » 3.4.x-dev
Assigned: Unassigned » john.oltman
Category: Support request » Feature request
Issue tags: -cancel

Thanks for the post. This seems like a feature that many users of the module could benefit from. Will work this into the next release.

john.oltman’s picture

I will ensure the "cancel allowed" time period will be configurable.

I believe the prevention of status updates outside of the open and close dates set in the host entity settings is something that is already implemented, at least for non-admins (admins can always edit, and that needs to stay that way). Please check the global settings at /admin/structure/registration-settings, there is an option there.

wattdesigns’s picture

Yes and no. First off, thanks for pointing out the global admin page that had a check in the "ignore the open and close dates" which I was elated to see! I thought unchecking that would fix everything, but I ran the test below and got poor results. Here's what I did.

Made a new registration event.
Enabled the registration.
Set the Open date to yesterday and the close date to tomorrow.
On a non-admin account, I checked and registration was open and good.
I went ahead and registered with the non-admin account.
Using the admin account, I changed the close date to yesterday (1 minute past the open date).
On the non-admin, I no longer could register which was great!

Here's where it gets odd.

I have a view set up that shows users their registrations. It allows the edit functions with a pull down to allow for edit, cancel, and delete (if given permissions to do so).

On the non-admin user, with the close date past, they are allowed to cancel their registration using that views interface.

So, is this more a views issue that I should just not allow that (but I don't see an interface to allow people to cancel their registrations otherwise), or is it a registration thing allowing a cancel outside the open/close dates?

Let me know if you need me to try anything to test theories.

Thanks again!!!!

Michael

john.oltman’s picture

You should have a different option on the global admin page named "Require update access to registrations" - check that, clear cache, and see if the Cancel option goes away for your scenario. I am guessing the non-admin user already lost the Edit access based on your other change.

wattdesigns’s picture

OK, so I've done that testing as well and it still isn't working right (most likely I'm doing something wrong).

Here's what I did this time.

On the main admin page, I ensured the following:
Disregard open and close dates in register access check NOT CHECKED
Prevent edit of existing registrations when new registration is disabled IS CHECKED
Require update access to registrations IS CHECKED
Cleared the cache.

Set up a new event.
Set open dates to a few days ago and close to a few days from now. Saved the event.
Using a non-admin user, I registered for the event.
Everything looks good.

Then, using admin account, I edited the event to move the close date to yesterday.
Cleared the cache again.
Using non-admin user, I went to the user profile, and the Registrations tab (which is the views page listing registrations for that user)
Using the Views Operations column, I used the pull down menu to Cancel.
It asked if I was sure and I confirmed.
The Status of the registration now shows Cancelled.

Again, what I'd like is for once the event registration is closed, I do not want users to be able to cancel their registration.

Thanks again for your help in this!!!

john.oltman’s picture

I followed your steps and it worked properly for me in a test system. What registration related permissions does your non-admin user have?

john.oltman’s picture

Side note: the ability to prevent cancel while registration is still open (e.g. 5 days before it closes) is a separate item that I'm working on as an enhancement. But based on your settings, the Cancel operation should disappear after close for non-admins, using the current release. Let me know on the permissions and we'll go from there.

wattdesigns’s picture

OK, here's the permissions that I have. Most of the non-admin role permissions are NOT checked. Here are the ones that are checked:

Administer own registrations View, edit and delete own registrations of this type.

View own registrations

View own registrations View own registrations, regardless of type.

Registration workflow: Use the Cancel transition. Move registrations from Pending, Complete, Waitlist states to Canceled state.

And that's it. It's so odd!!! Thanks for looking for me!

wattdesigns’s picture

Let me ask this question....how do you allow users to cancel their registration? Does it use a view? I'm just wondering if the view method I'm using is bypassing your system.

  • john.oltman committed 309f8483 on 3.4.x
    #3531895: Add a "Cancel by" date to registration settings
    
john.oltman’s picture

Title: Cancel Registration until 5 days before event » Add a "Cancel by" date to registration settings
Assigned: john.oltman » Unassigned
Status: Active » Fixed

Committed to 3.4.x and will be in the next release. To try it out now, download the dev version of the Registration module and follow the instructions in the README file in the modules/registration_cancel_by folder. I would only use the dev version on a test site.

john.oltman’s picture

Michael, the Cancel operation is added to the operations column of the registration listing - either the Manage Registrations listing for a host entity, or user registrations for a user, or the main listing of all registrations. It does not sound like you are bypassing the transition logic, unless you somehow have a custom operations column. That's ok - this should be a moot point soon with the new submodule I just committed.

wattdesigns’s picture

Ooooooo the new Cancel_by sounds great! I'll see about possibly testing it on a different site. The existing site is used pretty heavily so I'll wait a little bit before the upgrade. EXCITING!!!!

john.oltman’s picture

Thanks for any testing you can do. Just a heads up I am going to add another commit so there is a permission allowing admins to ignore the Cancel by date. Since they may need to be able to cancel at any time for some sites. I'll add that within the next day or two.

  • john.oltman committed c9b026e3 on 3.4.x
    #3531895: Allow administrators to bypass the "Cancel by" date
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

wattdesigns’s picture

Thanks again for all your help with this module. Any updates on a new official release as referenced above?

john.oltman’s picture

This week. By 7/27 at the latest, probably earlier.

wattdesigns’s picture

Perfect! Thanks for the status update. Love your module!