Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.49k stars 2.84k forks source link

Task - Task name doesn´t change in search section when edited #51126

Open IuliiaHerets opened 2 days ago

IuliiaHerets commented 2 days ago

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: 9.0.51-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5099789&group_by=cases:section_id&group_order=asc&group_id=291936 Issue reported by: Applause Internal Team

Action Performed:

  1. Open the staging.new.expensify.com website.
  2. Open any chat.
  3. Click on the "+" button.
  4. Click on "Assign Task"
  5. Add a title to the new task and save it.
  6. Click on "Search" on the bottom of the screen.
  7. Click on the dropdown menu and select "Chat"
  8. Click on the just created task.
  9. Once redirected to chat, open the Task and change it´s name.
  10. Click on the arrow on the top left corner to return to "Search"
  11. Verify the task name is now updated.

Expected Result:

After editing the task name, the new one should be displayed in search section.

Actual Result:

Task name is not updated in search section once the user edits it.

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/c10ed829-7bea-499a-8f3a-17c375ceaf6e

View all open jobs on GitHub

melvin-bot[bot] commented 2 days ago

Triggered auto assignment to @RachCHopkins (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

IuliiaHerets commented 2 days ago

We think that this bug might be related to #wave-collect - Release 1

IuliiaHerets commented 2 days ago

@RachCHopkins 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

NJ-2020 commented 1 day ago

Proposal

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

Task - Task name doesn´t change in search section when edited

What is the root cause of that problem?

The BE does not update with the latest edited comment and we do not optimistically update the comment https://github.com/Expensify/App/blob/66cf824036a51183d73dab2cc621901e43fe3196/src/libs/actions/Task.ts#L526

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

We should fix on the BE side and check if there's a search hash then if yes we should push a new optimistic data to update the searchHash report action

const searchEditTaskReportAction = {...}

if(searchHash) {
    optimisticData.push({
        onyxMethod: Onyx.METHOD.MERGE,
        key: `${ONYXKEYS.COLLECTION.SNAPSHOT}${searchHash}`,
        value: {
            data: {
                [report.parentReportActionID]: searchEditTaskReportAction
            }
        }
    })
}

What alternative solutions did you explore? (Optional)