Problem/Motivation

This is valid for both 7.x and 8.x.

Currently the module provides the following states:
- non-member(implicit, when there is no membership info)
- pending
- active
- blocked

There is no way to easily change or extend the list of the states used. When there is state, there is usually logic associated with it. When you have many states there is usually a predefined set of transitions between them. At the moment there are no transitions enforced. There is no sub-system in OG to actually enforce that. Everything is hard-coded everywhere.

Proposed resolution

Add handling on API / hooks level of list of states.
Each state should handle it's transitions and logic (on enter, leave, etc., to be defined).

Maybe expose that on group level (not global) through a field on the group entities.

Permissions extension to reflect the new functionalities and link permissions with transitions (similar to what workbench moderation is doing).

Remaining tasks

Discussion on:
0. Plan, is this reasonable?
1. Is there an utility module that will handle the states management, etc. like (state machine https://www.drupal.org/project/state_machine).
2. Are there better alternatives?
3. Action plan...

User interface changes

I expect mostly additions:
New states management UI (global) (maybe group level)
New transitions management UI (global) (maybe group level).
TBD.

API changes

TBD.

Data model changes

TBD.

Comments

ndobromirov created an issue. See original summary.

ndobromirov’s picture

Title: Membership states » Membership states are not extensible
amitaibu’s picture

> There is no way to easily change or extend the list of the states used

Right, there isn't. But you can attach fields and have your own logic there.

mpp’s picture

Status: Active » Closed (works as designed)

Hi @ndobromirov,

Thank you for reporting this issue. Closing this for now as works as designed.

Note that development and issues are now handled on GitHub.
You are welcome to open an issues and propose Pull Requests on GitHub.