Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LOW] [Splits] Task - Task report avatar in LHN shows task assignee instead of task creator before opening it #33461

Closed
6 tasks done
lanitochka17 opened this issue Dec 21, 2023 · 50 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Internal Requires API changes or must be handled by Expensify staff Monthly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 21, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.15-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

Precondition: User A and B have no prior chat and they are on private domain

  1. [User A] In 1:1 DM with User C. create a task and assign it to User B
  2. [User B] Note the avatar of task report in LHN
  3. [User B] Open the task report

Expected Result:

In Step 2, when User B receives the task, the task report avatar should display the avatar of task creator

Actual Result:

In Step 2, when User B receives the task, the task report avatar displays task assignee avatar (User B) instead of task creator avatar
The task report avatar only shows the correct avatar (task creator) after opening the task report in Step 3

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6323106_1703187095047.bandicam_2023-12-22_00-33-54-109.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01dd3b25a9441185ce
  • Upwork Job ID: 1737965082987188224
  • Last Price Increase: 2023-12-21
Issue OwnerCurrent Issue Owner: @roryabraham
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Dec 21, 2023
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Dec 21, 2023

Triggered auto assignment to @roryabraham (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@roryabraham
Copy link
Contributor

Weird

@roryabraham
Copy link
Contributor

Well what I'm seeing is that in step 2, the ownerAccountID is user A and the mangagerAccountID on the report is user B. Now going to click on the report as user B and see what happens.

@roryabraham
Copy link
Contributor

Clarification – I was looking at the task report, but there's also a chat report that's created between users A and B

@roryabraham
Copy link
Contributor

So it looks like the chat report that's optimistically created when assigning the task has the wrong participantAccountIDs

@roryabraham
Copy link
Contributor

Or rather, not just the one that's optimistically created, but the one that user B receives via Pusher

@roryabraham
Copy link
Contributor

Before user B clicks on the report, the participantAccountIDs array just had the accountID of B, in this case [185]. But after user B clicks on the report, the participantAccountIDs array had just the accountID of B, in this case [186].

Furthermore, I don't see any code that optimistically generates the chat report in this case.

@roryabraham
Copy link
Contributor

roryabraham commented Dec 21, 2023

Edit: the chat report is optimistically generated here, and the participantAccountID array is correct for the person who created the report.

@roryabraham
Copy link
Contributor

At this point, I'm pretty sure that this is a back-end issue, so I'm going to remove the deploy blocker label and check this off.

@roryabraham roryabraham added Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Bug Something is broken. Auto assigns a BugZero manager. and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Dec 21, 2023
Copy link

melvin-bot bot commented Dec 21, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01dd3b25a9441185ce

Copy link

melvin-bot bot commented Dec 21, 2023

Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Copy link

melvin-bot bot commented Dec 21, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 21, 2023

Triggered auto assignment to Contributor Plus for review of internal employee PR - @fedirjh (Internal)

@roryabraham
Copy link
Contributor

In short, the problem here is:

  • When user A uses CreateTask to create a chat report with user B:
    • the participantAccountIDs returned by the API for user A is (correctly?) [$userBAccountID]
    • the participantAccountIDs returned by the API for user B is (incorrectly?) [$userBAccountID] (i.e: the participantAccountIDs are not tailored for each users' perspective.
  • When user B uses OpenReport to open that same report, then participantAccountIDs is corrected to be [$userAAccountID]

@roryabraham
Copy link
Contributor

I'm thinking that an approach to solving this might be to leverage ReportUtils::pushNewChat in ReportUtils::getOnyxDataForNewTaskAssignee. There's some logic in ReportUtils::pushNewChat that sends a different value for participantAccountIDs to each participant, excluding the recipient. That's what we need to use here.

I also notice that it looks like some of the Onyx post-processing could be DRYed up between ReportAPI::createTask and ReportAPI::editTask.

Alternatively, we could make the jump to true 1:1:1 and move all the Onyx logic from PHP to Auth for both CreateTask and EditTask.

@roryabraham
Copy link
Contributor

cc @thienlnam for a buddy check

@thienlnam
Copy link
Contributor

It seems odd to me that the participantAccountIDs change based on who is opening the report - Is this something we updated recently? I would expect that they would always be the same regardless of who is opening it and then the personalDetails would be different depending on the user

When user B uses OpenReport to open that same report, then participantAccountIDs is corrected to be [$userAAccountID]

I would check why this is the case, we haven't historically included the report creator in the participants so there might have been a recent change (maybe for UCR?)

I'm sure your approach would work, and maybe the correct solution if it's intended that the participantAccountIDs are now intended to be different per user

@kavimuru
Copy link

Issue is reproducible still.

bandicam.2024-04-15.22-31-04-118.mp4

@melvin-bot melvin-bot bot added the Overdue label Apr 23, 2024
@roryabraham
Copy link
Contributor

Ok, unfortunate that this is still reproducible. Will need to circle back

@melvin-bot melvin-bot bot removed the Overdue label May 3, 2024
@melvin-bot melvin-bot bot added the Overdue label May 13, 2024
@melvin-bot melvin-bot bot removed the Weekly KSv2 label May 27, 2024
Copy link

melvin-bot bot commented May 27, 2024

This issue has not been updated in over 15 days. @sonialiap, @fedirjh, @roryabraham eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Overdue labels May 27, 2024
@roryabraham roryabraham removed their assignment May 29, 2024
@roryabraham
Copy link
Contributor

unassigning myself as I'm not sure when I'll be able to prioritize this

@melvin-bot melvin-bot bot added the Overdue label Jun 27, 2024
@sonialiap
Copy link
Contributor

@saracouto this issue was moved to "paused" and it's been open since December, should we close this out?

@melvin-bot melvin-bot bot removed the Overdue label Jun 28, 2024
@melvin-bot melvin-bot bot added the Overdue label Jul 29, 2024
@sonialiap

This comment was marked as outdated.

@melvin-bot melvin-bot bot removed the Overdue label Jul 30, 2024
@sonialiap

This comment was marked as outdated.

@melvin-bot melvin-bot bot added the Overdue label Sep 16, 2024
@sonialiap
Copy link
Contributor

Paused

@melvin-bot melvin-bot bot removed the Overdue label Sep 17, 2024
@melvin-bot melvin-bot bot added the Overdue label Oct 21, 2024
@sonialiap
Copy link
Contributor

Asking for a retest

@sonialiap
Copy link
Contributor

asked for new retest - slack

@mvtglobally
Copy link

@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Nov 14, 2024
@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in [#whatsnext] #expense Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Internal Requires API changes or must be handled by Expensify staff Monthly KSv2
Projects
Status: Done
Development

No branches or pull requests

7 participants