Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-11574

Inconsistent handling of UFField.visbility in profile editor

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: CiviCRM Profile
    • Labels:
      None

      Description

      The profile editor includes some sugar to ensure that 'is_searchable' and 'visibility' make sense – if a UFGroup has "Used For: [x] Search Views", then CRM_UF_Form_Field only allows UFField.visibility to be set to "Public Pages and Listings". However, this is buggy – consider the sequence:

      1) Create new UFGroup with "[ ] Search Views" disabled
      2) Add UFField with visibility "User..."
      3) Edit UFGroup to enable "[x] Search Views"
      4) Edit UFField. At this point, the DB says the UFField has visibility "User" but the UI says "Public Pages and Listings".

      Proposed solutions:
      a) Remove the current sugary behavior
      b) Make the sugary behavior consistent: When an admin saves a UFGroup with the "[x] Search Views" enabled, automatically scan for UFFields which have incorrect visibility. Alert the admin and fix the UFField visibilities. (Note: Alerting the admin is necessary to mitigate an unintuitive consequence of this fix. The consequence is that, if an admin enables and then disables "[x] Search Views", then all the underlying fields will be unnecessarily changed.)

      See also: http://issues.civicrm.org/jira/browse/CRM-11493?focusedCommentId=47565

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              timotten Tim Otten
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: