Matter Participants: Data Cleanup

Matter Participants: Data Cleanup


Table Overview

Matter Participants are contacts that are related to Matters.

They exist in the table: __M_Matters_Participating_Entities

They have three primary fields:

Field Description
Final_Matter_Id The Id of the Matter.
Final_Participant_Type Whether the participant is a Contact or User
Final_Participant_Id The Id of the participant.
Final_Participant_Role

The Role of the participant

(ie. Father, Adjuster, Cousin, Opposing Counsel, etc)

 

How Data Becomes Messy

Some systems treat a Role as a pick-list.  This ensures that all roles come from a well-managed list.  Apps like these seldom have problems.

However, in some systems, the Role is a free text field allowing any kind of input.  Over time, this tends to result in multiple spellings/variants of the same label.  For example, such a system may have the following roles:

  1. Father
  2. Fahter (A typo of 'Father')
  3. Dad (Another term for 'Father')

When restor these fields, unifying all these terms will provide a better experience for the firm.
 

Identifying Data Needing Cleanup

Before fixing anything, you should run this query to see a list of all used roles:

  1. SELECT DISTINCT
  2. Final_Participant_Type,
  3. Final_Role
  4. FROM
  5. __M_Matters_Participating_Entities
  6. ORDER BY
  7. Final_Participant_Type,
  8. Final_Participant_Role

When you do, you will see results like this.

You should then visually review the list and determine which items you want to merge.  Then you should run a script like this for each item you want to consolidate:

  1. --The client has multiple variants of the 'Father' role.
  2. --Unify them.
  3. UPDATE
  4. __M_Matters_Participating_Entities
  5. SET
  6. --This is our new value
  7. Final_Participant_Role = 'Father'
  8. WHERE 1=1
  9. --Only do this replacement on Contacts.
  10. AND Final_Participant_Type = '__M_Contacts'
  11. --These are our old values.
  12. AND Final_Participant_Role IN ('Dad', 'Fahter')

Once you have done your replacements, you should repeat this process to ensure all records are cleaned up to your satisfaction.