Uploaded image for project: 'CiviVolunteer'
  1. CiviVolunteer
  2. VOL-286

Make Assign UI more robust for case of Disabled Role

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Labels:
      None
    • Versioning Impact:
      Minor (add functionality in backwards-compatible manner)
    • Documentation Required?:
      None
    • Verified?:
      No

      Description

      On the Assign interface.

      To reproduce:

      • 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.)

      Says FJG:

      Our options for addressing this are:

      1. 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.
      2. Automatically update needs/opportunities to use some safe value if the associated role goes away.
      3. 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.

        Attachments

          Activity

            People

            • Assignee:
              pittstains Frank J. Gómez
              Reporter:
              ginkgomzd Michael Z Daryabeygi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: