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

[$500] Web - Assigned task title doesn't update when copying after changing it #26571

Closed
1 of 6 tasks
kbecciv opened this issue Sep 2, 2023 · 18 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Sep 2, 2023

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


Action Performed:

  1. Click the plus sign and select "Assign Task."
  2. Add a title, share it somewhere, and assign it to someone.
  3. Change the title of the assigned task.
  4. Go to the parent thread, hover over the title, Copy it, and paste it into the chat compose box.

Expected Result:

The copied title should reflect the updated title when changes are made to the assigned task title.

Actual Result:

The app continues to copy the original title even after the user has updated it for the assigned task.

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.62.0
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
Notes/Photos/Videos: Any additional supporting documentation

screen-capture.-.2023-08-28T055900.826.mp4
Recording.4192.mp4

Expensify/Expensify Issue URL:
Issue reported by: @oleksandr-pantsyr
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693227344359139

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0156e96662dd576f73
  • Upwork Job ID: 1699481737103171584
  • Last Price Increase: 2023-09-06
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 2, 2023
@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Sep 2, 2023

Proposal

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

Assigned task title not updated when copying after changing title

What is the root cause of that problem?

Inconsistent between two text, the displayed text is the translated for actionName + task title, but the copied text is the originalMessage html

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

We need to copy the translated for actionName + task title instead of originalMessage html
for that, we need to create a function in ReportActionsUtils.js

function getTaskStatusMessageText(actionName, reportID) {
    let taskStatusText = '';
    switch (actionName) {
        case CONST.REPORT.ACTIONS.TYPE.TASKCOMPLETED:
            taskStatusText = Localize.translateLocal('task.messages.completed');
            break;
        case CONST.REPORT.ACTIONS.TYPE.TASKCANCELLED:
            taskStatusText = Localize.translateLocal('task.messages.canceled');
            break;
        case CONST.REPORT.ACTIONS.TYPE.TASKREOPENED:
            taskStatusText = Localize.translateLocal('task.messages.reopened');
            break;
        default:
            taskStatusText = Localize.translateLocal('task.task');
    }

    return `${taskStatusText} ${allReports[reportID].reportName}`;
}

and use it here

onPress: (closePopover, {reportAction, selection, reportID}) => {
  // const messageHtml = isTaskAction ? lodashGet(originalMessage, 'html', '') : lodashGet(message, 'html', '');
  const messageHtml = isTaskAction ? ReportActionsUtils.getTaskStatusMessageText(reportAction.actionName, reportID) : lodashGet(message, 'html', '');

The function can use also in TaskAction.js

What alternative solutions did you explore? (Optional)

we can use reportAction.childReportName for task title and create a function in ReportActionsUtils.js to get translated value for actionName like the above (taskStatusText part).

@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 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

@anmurali
Copy link

anmurali commented Sep 6, 2023

I am really swamped right now and have to prep for Saastr keynote day after at some point. So going to rotate this.

@melvin-bot melvin-bot bot removed the Overdue label Sep 6, 2023
@anmurali anmurali removed their assignment Sep 6, 2023
@anmurali anmurali added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Sep 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

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

@Expensify Expensify deleted a comment from melvin-bot bot Sep 6, 2023
@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Sep 6, 2023
@melvin-bot melvin-bot bot changed the title Web - Assigned task title doesn't update when copying after changing it [$500] Web - Assigned task title doesn't update when copying after changing it Sep 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0156e96662dd576f73

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

Current assignee @lschurr is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (External)

@oleksandr-pantsyr
Copy link

Hi @kbecciv @tewodrosGirmaA

I reported this issue before @tewodrosGirmaA at Aug 25th.
https://expensify.slack.com/archives/C049HHMV9SM/p1692984640787769
I see @tewodrosGirmaA reported this issue at Aug 28th.

@kbecciv
Copy link
Author

kbecciv commented Sep 6, 2023

Updated already

@oleksandr-pantsyr
Copy link

thank you. @kbecciv

@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

@parasharrajat, @lschurr Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

@parasharrajat, @lschurr Eep! 4 days overdue now. Issues have feelings too...

@lschurr
Copy link
Contributor

lschurr commented Sep 11, 2023

@parasharrajat could you review this one?

@melvin-bot melvin-bot bot removed the Overdue label Sep 11, 2023
@BhuvaneshPatil
Copy link
Contributor

Same RCA and solution, might solve this one. Right, @parasharrajat

@parasharrajat
Copy link
Member

Yes, a thorough solution will solve all such issues in one go.

@parasharrajat
Copy link
Member

parasharrajat commented Sep 11, 2023

@lschurr Forgot to update you. I already reviewed this earlier and found this issue to be a regression from #24569 (comment)

Waiting on further instructions.

@pecanoro
Copy link
Contributor

Closing since we decided to fix it here: #26753

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

8 participants