Closed (fixed)
Project:
Entity Registration
Version:
7.x-1.x-dev
Component:
Registration Core
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
12 Apr 2012 at 15:11 UTC
Updated:
27 Jun 2014 at 21:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
levelos commentedGood questions @dpi, and I'm open to suggestions.
I suppose if could just be NA or something along those lines. I don't see this being a common situation.
Not sure I understand your question. They could look in the API docs?
I don't think as part of core. E.g., if a payment is processed, usually safe to treat the registration as complete. Additional fields with a matrix of statuses could always be added.
Feel free to close if nothing else, or leave open if we need to keep exploring ...
Comment #2
jpontani commentedNot sure if you want this in another issue or not.
Another possible scenario (I know this scenario exists in COD setups with uc/signup):
Which statuses are taken into account in the count of actual registrations for an event? If I create a custom status of "Waitlist", it will still currently count against the total number of registrations for an event, even though it shouldn't as it is a waitlisted registration.
Comment #3
levelos commentedActually it won't. Only Registrations with a status of "complete" counts against the total. But I can see how this could be limiting and maybe we need a separate schema for statuses with a flag on whether they should count against the total. Suggestions welcome.
Comment #4
dpiI guess I feel that state should be either 0 or 1, like node.module status meaning either unpublished or published. Third parties have implemented an in-between state for an editors workflow, but do not override the status column at all.
Right now, I'm thinking do not allow other modules to define their own state, as this seems like it could get messy.
Using the payment example. A field could be attached to a registration which shows unpaid or paid. There's surely an advantage to exposing this kind of status to views or permitted users.
Comment #5
jpontani commentedAh ok. Wasn't sure if it did that or not (haven't looked at the code recently).
I know COD is looking at possibly using this module for its next version, so the following two things are features they're needing if this is the module they go with:
Possible solution:
For both, in hook_registration_states, have more info returned in the array. IE:
Where state_limit is the state's registrant limit (maybe only 10 allowed on the waitlist, for example), total_limit is a flag as to whether any registration in this state would count against the overall registration limit, and title is self-explanatory.
You would probably want to store these in a separate table. That way you can have a UI to override settings that are declared initially in a module.
Just a thought.
Comment #6
levelos commentedThanks @jpontani, great ideas. One issue to resolve is that an event's capacity is currently stored at the registration parent entity level, and can be managed per event. That seems to go against having a global limit per state. A possible solution would be to allow users to map limits to each state in the registration settings and store that in the serialized settings field. registration_has_room() would have to be updated accordingly.
@dpi, I hear ya', but we need more than a binary flip for registrations and at least some of it is needed in core.
Comment #7
jpontani commentedTrue, hadn't really thought out the solution completely, just first thing that came to mind. In that case the hook_registration_states could pretty much remain the same, just as you said, store the state's settings in the registration settings.
Comment #8
gregglesDiscussion here feels pretty good to me.
My sense is that modules can create new states, but that Registration should ultimately keep that information even if the module is disabled to avoid the problem that registration are in a state that is no longer visible. This argues away from hooks for declaring states and for having an API to create states that a module would use during hook_install/hook_update.
Comment #9
ezra-g commentedI agree with greggles' point in #8 that it would be ideal for Registration to store the various statuses natively so that we don't run into the situation where a status is deleted.
A separate schema seems preferable to me. For example, see the schema for Signup_status.
As an example of how this kind of configurability can be used, here's screenshot from the Drupal 6 version of Signup status:
Beyond the popular waiting list and "payment pending placeholder" use cases described above, this kind of configurability provides a solid base for more customized attendee requirements. For example, I worked on a site that had different signup statuses set aside for folks from specific companies. The motivation was to ensure a mix of attendees from companies other than the one that was hosting the event. We used a special attendee status for the host company and programatically enforced a limit for that signup type, and automatically assigned the type to folks from the company hosting the event.
Comment #10
greggles@ezra-g #9 needs moar file upload.
Comment #11
ezra-g commentedComment #12
levelos commentedLooks good gang, we're on it.
Comment #13
levelos commentedThis one's all set and pushed. The basics:
Feedback welcome!
Comment #14
dpiIm going to bring back the original topic: If no states are active, what happens?
Comment #15
greggles@levelos - Thanks for the work and for documenting the changes in narrative form in #13. it would be great if you could post patches or the link to the commit to be able to go back and forth to confirm how the change was implemented. The commit for this is http://drupalcode.org/project/registration.git/commit/f36156c
Comment #16
levelos commentedSure @greggles, normally I would. The changes are actually spread across several commits. We also found a couple lingering issues which we'll be pushing any minute now.
@dpi, we could force at least one state to be active. Otherwise, I think it's reasonable behavior for events to appear full and not send any broadcast messages if there are no active states.
All, one change to consider is a set of registration states per registration bundle. Adds complexity, but potentially useful. Thoughts?
Comment #17
jpontani commentedQuite useful, in my mind. You might want to have a VIP role for one event, but another event might not have VIP potential. Just an example.
Comment #18
dpiSplit off state per registration discussion to #1547190: States per registration type / states as fields.
Comment #19
levelos commentedMarking this "meta" ticket as fixed so we can continue discussions as needed in other tickets.