Skip to content

[HOLD for payment 2024-04-09] [HOLD for payment 2024-04-05] [$500] Shortcut - Error shows up when creating second self-assigned task via Assign task shortcut #39049

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.57-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to self-DM
  3. Create a task and assigned to self
  4. Go to FAB
  5. Click Assign task shortcut
  6. Create another task which is assigned to self

Expected Result:

The second task is created successfully

Actual Result:

Error shows up when creating the second task via Assign task shortcut. The current user mention in the task becomes Hidden

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

Bug6428617_1711540650656.shortcut_task_self_DM.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0116839472c268c287
  • Upwork Job ID: 1773049601832173568
  • Last Price Increase: 2024-03-27
  • Automatic offers:
    • ishpaul777 | Contributor | 0

Activity

  1. added
    DeployBlockerCash
    on Mar 27, 2024
  2. github-actions commented on Mar 27, 2024

    @github-actions
    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.
  3. melvin-bot commented on Mar 27, 2024

    @melvin-bot

    Triggered auto assignment to @iwiznia (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. lanitochka17 commented on Mar 27, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #vip-vsp

  5. lanitochka17 commented on Mar 27, 2024

    @lanitochka17
    Author

    @iwiznia FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  6. nexarvo commented on Mar 27, 2024

    @nexarvo
    Contributor

    Regression from #38669
    For self DM, it is creating new optimistic report everytime task is created from Shortcut. It should not create new report but take the original self DM report. The issue is specifically here:

    if (accountID > 0) {
    const accountLogin = allPersonalDetails?.[accountID]?.login ?? '';
    setAssigneeValue(accountLogin, accountID, reportID);
    }

    Due to new optimistic report, the backend is sending error:
    Screenshot 2024-03-27 at 10 05 55 PM

    Mismatch in reportID:
    Screenshot 2024-03-27 at 10 05 09 PM

  7. melvin-bot commented on Mar 27, 2024

    @melvin-bot

    📣 @nexarvo! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  8. nexarvo commented on Mar 27, 2024

    @nexarvo
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Error shows up when creating second self-assigned task via Assign task shortcut

    What is the root cause of that problem?

    We are getting chat report by participant lists here:

    return lodashIsEqual(sortedNewParticipantList, report.participantAccountIDs?.sort());

    This returns the first matched record. (BTW sometime we have more than one chat report selected in this function but it return the first one). Which might not be the exact report we want. In current issue the same problem is happening that it is selecting wrong report in above function.

    What changes do you think we should make in order to solve the problem?

    We already have chat ID here:

    if (accountID > 0) {
    const accountLogin = allPersonalDetails?.[accountID]?.login ?? '';
    setAssigneeValue(accountLogin, accountID, reportID);
    }

    We can use this chat ID to get the report. This way we will have the exact report which we want. Right now In ReportUtils.ts we don't have any function to get report by ReportID. We can create one:

    function getChatByReportID(reportID: string) {
        return allReports.find(report => report. reportID = reportID);
    }

    We will call the new function in place of this function:

    chatReport = ReportUtils.getChatByParticipants([assigneeAccountID]);

    Like this:

    chatReport = getChatByReportID(reportID); 

    What alternative solutions did you explore? (Optional)

  9. added
    External
    on Mar 27, 2024
  10. changed the title [-] Shortcut - Error shows up when creating second self-assigned task via Assign task shortcut[/-] [+][$500] Shortcut - Error shows up when creating second self-assigned task via Assign task shortcut[/+] on Mar 27, 2024
  11. melvin-bot commented on Mar 27, 2024

    @melvin-bot
  12. added
    Help Wanted
    on Mar 27, 2024
  13. 31 remaining items

  14. changed the title [-][HOLD for payment 2024-04-05] [$500] Shortcut - Error shows up when creating second self-assigned task via Assign task shortcut[/-] [+][HOLD for payment 2024-04-09] [HOLD for payment 2024-04-05] [$500] Shortcut - Error shows up when creating second self-assigned task via Assign task shortcut[/+] on Apr 2, 2024
  15. melvin-bot commented on Apr 2, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.58-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-04-09. 🎊

    For reference, here are some details about the assignees on this issue:

  16. melvin-bot commented on Apr 2, 2024

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@ishpaul777] The PR that introduced the bug has been identified. Link to the PR:
    • [@ishpaul777] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@ishpaul777] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@ishpaul777] Determine if we should create a regression test for this bug.
    • [@ishpaul777] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. sakluger commented on Apr 8, 2024

    @sakluger
    Contributor

    There was a regression from the linked PR. The new PR to fix that regression is here: #39328. We'll wait for that to be deployed before paying this one out.

  18. ishpaul777 commented on Apr 16, 2024

    @ishpaul777
    Contributor

    still held on regression fix prod deployment

  19. nexarvo commented on Apr 24, 2024

    @nexarvo
    Contributor

    @sakluger can we proceed with payments here as the regression from this issue was fixed and deployed to prod. The issue for the regression is also closed #39260

  20. nexarvo commented on Apr 26, 2024

    @nexarvo
    Contributor

    @sakluger I think this is a $500 ticket as this was made external before we made standard as $250. The amount is also mentioned in the title.

  21. sakluger commented on Apr 26, 2024

    @sakluger
    Contributor

    Thanks for the heads up @nexarvo! The base price is $500, but we cut it in half when there is a regression.

    Summarizing payment on this issue:

    Contributor: @nexarvo $250 (50% reduction for regression), sent offer via Upwork
    Contributor+: @ishpaul777 $250 (50% reduction for regression) paid via Upwork

  22. added
    Daily
    and removed
    Weekly
    on Apr 26, 2024
  23. sakluger commented on Apr 26, 2024

    @sakluger
    Contributor

    All paid, thanks everyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineeringExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions