-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2023-12-20] [$500] Task - When the receiver clicks on 'Copy to clipboard' for a task, the copied text shows incorrectly #29035
Comments
Job added to Upwork: https://www.upwork.com/jobs/~0104b5bf9c69d8ee5f |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @cubuspl42 ( |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
ProposalPlease re-state the problem that we are trying to solve in this issue.When a new task is created, the recipient gets "task for undefined" copied to the clipboard. What is the root cause of that problem?When a new task is created, the task report behaves the same way as the thread report: it is not sent by Pusher to the recipient unless one of two happens:
Because of that, the task report is Lines 922 to 925 in 9945d3c
What changes do you think we should make in order to solve the problem?Since the task report is under the hood a child report of the "Task created" report action, even though the report is not sent by Pusher to the recipient, the original And we already use it as a fallback here, we can do the same approach in the copy-to-clipboard text.
After the recent changes, we use the Zero, make a Pusher BE change:We set the childReportName optimistically here: Line 2088 in 2f60c27
It also is updated on the OpenReport API call. We need to also add an update of This will also help to change the task name in the chat dynamically to avoid this situation: First, refactor
|
function TaskAction(props) { | |
return ( | |
<> | |
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter]}> | |
<Text style={[styles.chatItemMessage, styles.colorMuted]}>{Task.getTaskReportActionMessage(props.actionName, props.taskReportID, false)}</Text> | |
</View> | |
</> | |
); | |
} |
We should also use the util function in TaskPreview
, similar to what I mentioned in my other proposal here – this current solution will fix both issues at a time.
const taskTitle = props.taskReport.reportName || props.action.childReportName; |
- const taskTitle = props.taskReport.reportName || props.action.childReportName;
+ const taskTitle = TaskUtils.getTaskTitle(props.taskReportID, props.action.childReportName);
What alternative solutions did you explore? (Optional)
I would agree with @paultsimura's proposal here. I think I missed the fact that child report name is included in the action 😄 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Copied text pastes with undefined in the string. What is the root cause of that problem?As mentioned in the other proposals, the function that copies the text relies on the reportAction to be in storage in order to copy the correct text. What changes do you think we should make in order to solve the problem?Given that we already have the content we need, we're showing it in the list item, we can move the logic we use in the list item (TaskPreview.js) into a new function and use that function to do both: a) render the content in the list item b) render the content to be used in the clipboard function, with "Task for " prepended, lowercase or uppercase. Note: By retrieve I mean to just return, no api calls involved.This approach copies and pastes "Task for " + <@mention if any> + taskTitle. Assuming the user wants to copy the entire text, including the mention. What alternative solutions did you explore? (Optional) |
We have a consensus that we need backend changes here before we can move forward with front-end fixes. C+ reviewed 🎀 👀 🎀 (no proposal has been selected yet; we need help coordinating with the backend) |
Triggered auto assignment to @NikkiWines, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@NikkiWines Would you review the "Zero, make a Pusher BE change" section in this proposal? We need to figure out a plan for the next steps. Something that could work...
Let me know what you think |
Triggered auto assignment to @sonialiap ( |
Bug0 Triage Checklist (Main S/O)
|
Sorry for the delay here, will give the BE proposal a review tomorrow!! |
👋 Looks like the backend changes suggested here align with some proposed backend changes for another issue related to task name changes / editing tasks, which is already underway (being handled by @marcaaron). Let's wait for those changes to be deployed and re-evaluate to determine what (if any) next steps are necessary to resolve this issue |
Ooh, although it looks like we've possibly decided to hold off on those changes 🤔 @thienlnam should we HOLD on this issue as well? |
@cubuspl42 @NikkiWines @sonialiap this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@paultsimura Just the translation |
Thank you. The PR is ready for review: #32249 In this PR I've fixed another issue – the report text in LHN (if the last message was a task) was not localized and did not get updated when the task title was modified: it always remained "task for ${originalTitle}". |
From the checklist:
If you modify some logic for displaying a message in a non-trivial way, this checkbox starts applying to you in the context of this message, in my opinion. |
Sorry, I don't think I got your point in the context of this task. I did use localization, and the copy was confirmed in Slack. Am I missing something? |
I just meant that this isn't really "another issue" in my interpretation. Solving unrelated issues in a PR for a specific issue might be not considered appropriate. Everything is fine, we can move on |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.11-25 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 2023-12-20. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
|
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:
|
|
@cubuspl42 $500 - paid ✔️ |
@sonialiap Offer accepted, Thank you |
@cubuspl42, @paultsimura, @sonialiap, @thienlnam Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Payment completed ✔️ |
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:
Expected Result:
When the receiver clicks on “Copy to clipboard” for a task, the copied text should display the task title, not “undefined”
Actual Result:
When the receiver clicks on “Copy to clipboard,” the copied text shows as "Task for undefined," which is incorrect
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.79-3
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.Recording.2023-10-06.at.10.48.11.PM.mov
Screen.Recording.2023-10-06.at.10.42.17.PM.mov
Screen.Recording.2023-10-06.at.10.40.39.PM.mov
20231006224627.mp4
screen-recording-2023-10-06-at-100240-pm_wtHhh4Fs.mp4
Recording.13.mp4
Expensify/Expensify Issue URL:
Issue reported by: @ayazhussain79
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696612963386119
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: