Event full inconsistencies
The way EventFull is calculated in apiv4 is not consistent with elsewhere
apiv4 returns a field 'remaining_participants'
which is
event.max_participants - COUNT(participant rows for the event where contact is not deleted, participant is not test and participant status is_counted)
By contrast apiv3 returns the contents of CRM_Event_BAO_Participant::eventFull()
which also takes into account the participant role and other aspects of the status
eventFull()
has some funky parameters - there are 12 calls to it
caller | returnEmptySeats | includeWaitingList | returnWaitingCount | considerTestParticipant | onlyPositiveStatuses |
---|---|---|---|---|---|
apiv3-event | TRUE | TRUE | FALSE | FALSE | FALSE |
Participant::eventFullMessage | FALSE | FALSE | FALSE | FALSE | FALSE |
Participant::eventFullMessage(2) | FALSE | TRUE | TRUE | FALSE | FALSE |
ParticipantStatusType::process | TRUE | FALSE | FALSE | FALSE | |
ParticipantTest | FALSE | TRUE | FALSE | FALSE | FALSE |
Registration::preProcess | FALSE | if-event-has-waitlist | FALSE | FALSE | FALSE |
Registration::preProcess(2) | TRUE | if-event-has-waitlist | FALSE | FALSE | FALSE |
Event_Confirm::formRule | FALSE | if-event-has-waitlist | FALSE | FALSE | FALSE |
ParticipantConfirm | TRUE | FALSE | TRUE | FALSE | TRUE |
Register::preProcess | FALSE | if-event-has-waitlist | FALSE | FALSE | FALSE |
EventInfo::run | FALSE | if-event-has-waitlist | FALSE | FALSE | FALSE |
event-cart | TRUE | TRUE | FALSE | FALSE | FALSE |
Note that this issue somewhat relates/ explains