intakedesk / PowerBI-General

Placeholder for issues migrated from Jira
1 stars 0 forks source link

Cases Sent By Data Discrepancy #670

Open jesusitd opened 3 years ago

jesusitd commented 3 years ago

cases_duplicate_sent_by.xlsx

Please see file.

There's three 2017 cases in the view suitecrm.v_cases_tv20_basic that have Duplicate entries due to the Tasks query related to the SENT BY field.

It generates duplicate case_id entries when this join happens:

LEFT JOIN (select  concat(u.first_name,' ', u.last_name) 'Sent To Firm By' , t.parent_id, t.parent_type 
               from tasks t
               join tasks_cstm tc on tc.id_c = t.id
               join users u on u.id = t.modified_user_id and u.deleted = 0
               where t.deleted = 0 
               and t.parent_type = 'Cases'
               and tc.system_id_c = 'NJM - Automation - Create Pre-Transfer Review Task') SQ ON SQ.parent_id = cases.id

We might want to act on these entries.