Open EnriqueCorado opened 3 years ago
Dev note: these users are part of a 'User group' so are potentially looking at records from other users in their group.
My gut says it's a bug with how records are returned from the user group ties since the IDs of the two records are the same
updated comment on task
@johnhbenetech, @EnriqueCorado Yup seems like the issue here is the user group. The same record is returned from two different users within the same group (I managed to reproduce this locally). However, I don't have a quick fix for that one. I thought that adding distinct would help here, but turns out it is not enough. How urgent this bug is? Can this wait till Monday?
@awalkowiak it can wait till Monday. thank you for taking a look so quickly
Turns out that this is a bit more complex issue. That is related to our architectural decisions related to the User Profile - Organization linkage.
If a user does update to not his record (but from his User Group), then this user is also added/assigned to this specific record - organization (user is added to the user_profile_organizations table). Because we are pulling records for a provider that is in a specific User Group, together with records from other users within the Group, the duplicate record occurs. I tried adding simple distinct, but because both records have two different user profiles (after join) assigned they are treated as different records (that's why both records have different 'owners' - below the last update date on the record card). Additionally, we are also not storing the information about who did the last update.
Potential solution: Perhaps we should store information about the updating user (in Organization relation to UserProfile updatedBy - if it'd be null, then it'd mean that uploading provider-organization like Eden, UWBA, or other made the last update) and only 'real' owner user would be stored in user_profile_organizations table (without adding 'new owner' on record update within the User Group).
@jkondrat Do you have any other potential solutions to this issue? What do you think about this one?
@johnhbenetech, @EnriqueCorado what do you think about it?
@awalkowiak sound good to me, unless updatedBy is sufficient, we can also add the 'creator' or 'owner' field to the Organization
Tested with success
@abaranowska1 why are we not showing all records owned also under the search bar?
@EnriqueCorado that's never been how the functionality worked.
Records where you = owner appear above search
Records where owner = anyone else appear below search
Prior to this change we erroneously allowed for more than one owner, so in those cases a record would show in both places. Now that we limit the record to 1 owner the functionality works as specified.
If we would like to change the logic used to populate the bottom section that would need to be a separate task
Bug description For the NC pilot, I am adding the social media links, and once I save, on the homepage I see two of the sam record. Tried to edit a different record, added social media links, and record shows up twice in the own section panel
To Reproduce Steps to reproduce the behavior:
Dev note: John - these users are part of a 'User group' so are potentially looking at records from other users in their group. My gut says it's a bug with how records are returned from the user group ties since the IDs of the two records are the same
Actual result
Expected behavior only show the record updated not a duplicate
Screenshots/gifs
Verified on: OS: Browser: Google Chrome Version: Version 88.0.4324.150 (Official Build) (64-bit)
Additional context DEV note:
Dev Signoffs
QA Signoffs
Product Signoff