Tasks: Append Assigned To and Completed By to Descriptions

Tasks: Append Assigned To and Completed By to Descriptions

 The script below will append the text 'Assigned to User: {firstName lastName}' and 'Completed by User: {firstName lastName}' to the end of the task description in cases where the users Email address was changed on the __M_Users table as a result of User Mapping. 

In cases where the firm's domain has changed, every user's email address will have changed.  In which case the script below will add that information to all tasks, which would be redundant for some records.  Therefore, you might want to adjust the WHERE clause accordingly.


  1. --Update Tasks to have the Assigned To/Completed By in their description.
  2. UPDATE __M_Tasks SET Final_Description = CONCAT(Final_Description, CHAR(10), CHAR(10), 'Assigned to User: ', u.Final_FirstName, ' ', u.Final_LastName) FROM __M_Tasks_AssignedTo_Users tau __M_Users u, __M_Tasks t WHERE 1=1 AND u.Original_Email != u.Final_Email
  3. AND t.Id = tau.Final_TaskEntry_Id
  4. AND u.Id = tau.Final_User_Id UPDATE __M_Tasks SET Final_Description = CONCAT(Final_Description, CHAR(10), CHAR(10), 'Completed by User: ', u.Final_FirstName, ' ', u.Final_LastName) FROM __M_Users u __M_Tasks t WHERE 1=1 AND u.Original_Email != u.Final_Email
  5. AND t.Final_Completed_By_Id = u.Id

    • Related Articles

    • Tasks and Calendar Entries: Removing Duplicate User Assignments

      Sometimes the same user is included in a calendar event, or assigned to a task, multiple times. This can be a result of User Mapping or data error in the legacy system. Below is an example of how this can happen. A calendar event includes user John ...
    • Create Notes from Matter Descriptions

      Some platforms do not support matter descriptions. The following will transform a matter description into a matter note. --Transform Matter Descriptions to Matter Notes INSERT INTO __M_Common_Notes (Id, Final_Parent_Id, Final_Parent_Type, ...
    • If a task is related to an archived matter, mark it as complete

      The following will mark all tasks that are related to a closed/archived matter as Complete. --The client has a bunch of tasks related to archived matters. --These tasks are NOT follow-ups and they NEVER intend on completing them. --The client would ...
    • Matters: Prepending Client Names to Matters

      The following script will prepend Client Names to Matter Names. For Example: Divorce 2016 would become John Smith --- Divorce 2016 Here is the relevant script: --Prepend all matter descriptions with the client name. UPDATE __M_Matters SET ...
    • Notes: Add Creator Information to the Body

      The script below will append the text 'Created By: {firstName lastName}', 'Created on behalf of: {firstName lastName}', and 'Updated by: {firstName lastName}' to the end of the note description in cases where the user's Email address was changed on ...