Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.4.4, 4.0.4
    • Fix Version/s: 4.1.0
    • Component/s: CiviCase
    • Labels:
      None
    • User friendly description:
      activity part has been fixed in r37108.
    • Is MIH?:
      Yes
    • Code Sprint:
      Yes

      Description

      Support the creation of custom fields attached to case records. The existing schema should support this feature; however the UI will need to be structured a bit differently given the way case records are currently managed.

      Administer Custom Data Sets
      ---------------------------------------
      Create new custom data set type = Cases if CiviCase is enabled, and allow assignment based on Case Type(s). Disable multiple-record option for case custom data sets.

      Open Case
      ---------------------------------------
      Open case interacts with both the case record and the open case activity.
      * One to N case custom data sets are conditionally injected in the open case form just below the Case Type dropdown when a case type is selected or changed.
      * Custom data(s) linked to "any" case type are injected immediate as the form is loaded. If a default case type has been configured, any custom data set(s) linked to that case type are injected as the form is loaded.
      * Modify open case form to include empty (' - select - ') option for Case Type dropdown. This prevents us from loading custom case pane(s) for a case type by default UNLESS the site has configured a default case type.

      Manage Case
      ---------------------------------------
      Inject an accordion pane for each custom data set associated with the currently viewed Case (determined by case type or for all cases). to group each case custom data set. Custom data panes display custom fields data in view mode and include an Edit button -- located within each custom data set pane, and only impacting that set of data. Clicking the edit button should open a modal popup where the custom data can be edited (similar to how case tags are handled). This is important as the manage case screen is a collection of data in view mode; we don't want to unnecessarily redirect to a form view just to handle case custom fields.

      See attached screen shot for layout example ("Additional Case Info" is a case custom data pane).

      Record a "Change Custom Data" activity when case custom data is updated
      ---------------------------------------
      * Add a new activity type (new installs / upgrade). Label and Name = "Change Custom Data", compenent_id = CiviCase (7)
      * When custom data is modified via the modal popup, automatically insert a "Change Custom Data" activity:
        - source_contact_id = current user's contact id
        - target_contact_id = case "client"
        - details = json encoded string - name / value pairs for the "pre-update" custom fields (field label and field value)
        - content_type = "application/json" NOTE: See related issue to add content_type column to civicrm_activity table.
        - status = completed
        - subject = $customDataSet.title . " : change data"

      Search
      ---------------------------------------
      Extend case search (find cases and Cases pane in Advanced Search) to include "searchable" custom data sets/fields for searching.

      Export
      ---------------------------------------
      * Export Primary fields includes columns for all case custom data fields of any type (same rules as we have for Activity custom data export).
      * Export - Select fields exposes all case custom fields in hierarchical select for inclusion in export.

        Issue Links

          Activity

          Hide
          Brian Shaughnessy added a comment -
          This issue is based on an MIH project: http://civicrm.org/civicrm/contribute/transact?reset=1&id=32
          Show
          Brian Shaughnessy added a comment - This issue is based on an MIH project: http://civicrm.org/civicrm/contribute/transact?reset=1&id=32
          Hide
          Brian Shaughnessy added a comment -
          this looks great.

          the only thing I found was that an activity record is not created when the custom fields are edited.
          other than that, everything looks good.
          Show
          Brian Shaughnessy added a comment - this looks great. the only thing I found was that an activity record is not created when the custom fields are edited. other than that, everything looks good.
          Hide
          Brian Shaughnessy added a comment -
          couple oddities --

          when you create a new case, activity custom fields are below the details field, and the case custom fields are at the bottom of the form. if you enter data in the form, but don't complete all the required fields -- thus triggering a form rule -- the resulting form has the case custom fields duplicated, once below activity fields and once at the end of the form.

          also -- in the manage case screen, if you edit the custom fields, the popup says "new contact" (modal title just needs to be updated)
          Show
          Brian Shaughnessy added a comment - couple oddities -- when you create a new case, activity custom fields are below the details field, and the case custom fields are at the bottom of the form. if you enter data in the form, but don't complete all the required fields -- thus triggering a form rule -- the resulting form has the case custom fields duplicated, once below activity fields and once at the end of the form. also -- in the manage case screen, if you edit the custom fields, the popup says "new contact" (modal title just needs to be updated)
          Hide
          Deepak Srivastava added a comment -
          Done with the fixes.
          Show
          Deepak Srivastava added a comment - Done with the fixes.
          Hide
          Brian Shaughnessy added a comment -
          looks good
          Show
          Brian Shaughnessy added a comment - looks good

            People

            • Assignee:
              Brian Shaughnessy
              Reporter:
              Brian Shaughnessy
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development