Affects Version/s: 2.2.1
Fix Version/s: None
Versioning Impact:Minor (add functionality in backwards-compatible manner)
On the Assign interface.
- Select volunteer project and click "Assign Volunteers"
- Search for volunteers (any criteria)
- Select a volunteer and click "Assign"
- Error message "'N' is not a valid option for field custom_2" appears and no volunteers are assigned. (Custom field ID 2 is "Volunteer Role". N will vary based on the value of the role.)
The error is displayed if a volunteer is assigned to an opportunity which specifies a role which has since been disabled or deleted. (The role is just an option in an optionGroup, and options can be disabled/deleted by admins.)
Our options for addressing this are:
- Invoke a hook or something to prevent roles from being disabled/deleted if they apply to active projects. Or throw up a warning before allowing this to occur.
- Automatically update needs/opportunities to use some safe value if the associated role goes away.
- Investigate why the drag-and-drop assignment mechanism works (probably the role ID evaluates to '' and that empty string is passed to the API) and duplicate that for the problematic assignment mechanism.
This seems not urgent to me, and architecture for Vol 3.0 will probably kill the notion of a role and allow others to implement is as a custom field if they so desire, so I'm hesitant to invest in it unnecessarily.
MZD votes for validating the roles on loading the assign interface and displaying a message.
You have opportunities for Roles that are no longer valid. Either change the roles, or validate the Roles you have configured. [link to configuration]. Contact your system administrator if this is unexpected.