CRM-5218 Interface to allow Add/Update/Enable/Disable subtypes

    Details

    • Type: Sub-task
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Add an interface to allow Add/Update/Enable/Disable subtypes.

      Update:
      =====
      Freezes basic type and only allows changing the subtype label. Affect should immediately be visible at all the places like contact view screen, create new contact list etc

      Disable/Enable:
      ==========
      Makes a type in-active. Lists displaying types would automatically exclude the inactive type.

      Delete:
      =====
      Shouldn't be allowed (with a message), if there are any custom data associated with the type being deleted, which is expected to be deleted manually from custom data screen.
      Just before the deletion, contact_sub_type value for all contacts (with subtype as type being deleted) should be unset (or updated to NULL)

      Disabling Built-in Types - Not Supported for this Release
      ===========================================
      NOTE: Much of the work to support disabling of Built-in contact types (e.g. Household or Organization) has been committed under this issue. However, there are still some some open issues / areas to test and handle so we are NOT exposing the ability to disable built-in types to the administrative UI. If you really need that functionality you can experiment with disabling the contact type manually in the DB - ping us on IRC to discuss.

        Attachments

        1. Picture 1.png
          46 kB
          David Greenberg
        2. Picture 2.png
          44 kB
          David Greenberg

          Activity

          [CRM-5218] Interface to allow Add/Update/Enable/Disable subtypes
          Sushant Paste added a comment -

          Tested in r24758.

          David Greenberg added a comment -

          Several issues to look at / fix (assigning to deepak to check for scope first):

          1. (definitely bug) The selector actions show BOTH an Enable and a Disable link. This is incorrect. We always show "Disable" action if row is enabled and "Enable" action if row is disabled. See attached screenshot.

          2. If I rename (change label) a "built-in" contact type - for example change "Individual" to "Person" - we pickup the new "label" in the Create New drop-down. However, we don't pick it up in the following places:

          • New contact form title (still says "New Individual" instead of "New Person" (see attached screenshot)
          • Custom Data Group - Extends drop-down still shows "individual"
          • Profile Field - Field Name still shows "Individual"

          3. Disabling a built-in type doesn't remove it from Custom Data Group extends or Profile Field as well.
          If we fix item 2 to use a shared function to grab the contact_type.label values we could also suppress disabled types at the same time.

          David Greenberg added a comment -

          Remaining work to support disabling of "built-in" contact types (Org and Household) is spec'd in http://issues.civicrm.org/jira/browse/CRM-4566 currently scheduled for v3.2.

          David Greenberg added a comment -

          Marking time spent hiding built-in contact types in Import forms.

            People

            • Assignee:
              David Greenberg
              Reporter:
              Deepak Srivastava

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Time Spent - 3 weeks, 30 minutes Remaining Estimate - 3 hours
                3h
                Logged:
                Time Spent - 3 weeks, 30 minutes Remaining Estimate - 3 hours
                3w 30m