The impetus for this feature is that one of our clients is having partner organizations who receive little to no training create volunteer project in CiviCRM. The client wishes to simplify the partner user experience by displaying only a subset of the fields and setting default values for the rest.
The technical approach will be to:
- Create a CiviCRM setting for each of the various project fields that will allow an administrator to give it a default value:
- Profiles - Format data in such a way that we can have more than one selected with various use types (e.g., individual registration, group registration), just like the angular interface.
- Is Active
- Update API VolunteerUtil.getsupportingdata to retrieve these settings and return them in the defaults array
- Create a form that exposes these settings so clients/users can modify global defaults themselves
- Update the Angular form to use these defaults if it is being used to create (rather than edit) a volunteer project
- Create hook_civicrm_volunteer_projectDefaultSettings() to allow manipulation of these defaults in code.
Note: In this issue we also created a setting for default project relationships (volunteer_project_default_contacts) but stopped short of implementing a GUI for setting it (or using it in the API or on the client side) because it was out of scope and not trivial to do.