Closed kuanb closed 7 years ago
I did a bit of research into this. It looks like the BaseModel._getMultiResponse method restricts the resulting object's fields to only the columns specified in the Client
model's constructor.
Also, Clients.findByOrg
's SQL query doesn't SELECT the appropriate column names (user_first
, user_last
) the same way that the other Clients
finder methods do. But even if it did, the _getMultiResponse
call would strip them out.
So, I need to think a bit on what to do about this. A couple thoughts come to mind:
Clients.findByOrg
method (unfortunate)
Looks like when I modified a clients find by org-esque method (or something like that from our model level refactors in the last week of working on CC in 2016), we missed a case where clients was using their associated case manager's first and last names.
As a result, if you look at first and last name for the user/case manager for each client, they are
undefined
on the clients view:Example screen capture with client names out of frame: