-
Notifications
You must be signed in to change notification settings - Fork 3k
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-08-17] [$1000] Red dot and [Attachment] shows in LHN even after close error message #24136
Comments
Triggered auto assignment to @kevinksullivan ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.On closing the error in reportAction the red dot is not removed and last message is not updated in LHN. What is the root cause of that problem?This here App/src/pages/home/report/ReportActionItem.js Line 534 in f9d760f
is handler on clicking close on the error. This method here deletes this attachment report action on clicking the close on attachment uploading error. App/src/libs/actions/ReportActions.js Line 10 in f9d760f
but it does not update the report's lastMessageText, actor, translation key etc. What changes do you think we should make in order to solve the problem?We should update the report also here when we click close on the error similar to the deleteReportComment App/src/libs/actions/Report.js Lines 960 to 963 in f9d760f
So, we replace this App/src/libs/actions/ReportActions.js Lines 12 to 15 in f9d760f
with something like this const optimisticReportActions = {
[reportAction.reportActionID]: null,
};
// Delete the optimistic action
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {
...optimisticReportActions,
});
let optimisticReport = {
lastMessageTranslationKey: '',
lastMessageText: '',
lastVisibleActionCreated: '',
};
const {lastMessageText = '', lastMessageTranslationKey = ''} = ReportActionUtils.getLastVisibleMessage(reportID, optimisticReportActions);
if (lastMessageText || lastMessageTranslationKey) {
const lastVisibleAction = ReportActionUtils.getLastVisibleAction(reportID, optimisticReportActions);
const lastVisibleActionCreated = lastVisibleAction.created;
const lastActorAccountID = lastVisibleAction.actorAccountID;
optimisticReport = {
lastMessageTranslationKey,
lastMessageText,
lastVisibleActionCreated,
lastActorAccountID,
};
}
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, optimisticReport); Since we are reusing the same logic we might extract this to a separate function in Report or ReportUtils What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Clearing the error message does not update the last message text. What is the root cause of that problem?The real issue here is that, when the attachment upload is failed, we should revert the last message text to the previous text. This issue was previously fixed here #22342, but a new report attribute called When we upload an attachment, App/src/libs/actions/Report.js Line 258 in f9d760f
Line 1524 in f9d760f
When the attachment fails to upload, we only revert the App/src/libs/actions/Report.js Lines 304 to 312 in f9d760f
LHN last message will prioritize App/src/libs/OptionsListUtils.js Lines 385 to 387 in f9d760f
What changes do you think we should make in order to solve the problem?We should also revert the App/src/libs/actions/Report.js Lines 910 to 922 in f9d760f
snippet
|
Job added to Upwork: https://www.upwork.com/jobs/~019aca46aa1b2b9812 |
Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new. |
Agree this is a bug, moving forward to external |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
Triggered auto assignment to @tjferriss ( |
📣 @rushatgabhane Please request via NewDot manual requests for the Contributor role ($1000) |
📣 @gadhiyamanan 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
@tjferriss I am going OOO for a week, so tapping you in to help out in the interim. Thanks! |
I like @bernhardoj's proposal #24136 (comment) because it fixes the root cause C+ reviewed 🎀 👀 🎀 |
Triggered auto assignment to @madmax330, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @rushatgabhane Please request via NewDot manual requests for the Reviewer role ($1000) |
📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR is ready cc: @rushatgabhane |
🎯 ⚡️ Woah @rushatgabhane / @bernhardoj, great job pushing this forwards! ⚡️ The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.52-5 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-08-17. 🎊 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:
As a reminder, here are the bonuses/penalties that should be applied for any External 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:
|
|
Created a manual request - https://staging.new.expensify.com/r/3716241818407301 |
Payment summary
|
Adding @JmillsExpensify for the newdot payment. Following this SO, but let me know if I should be doing something differently |
Payments made to @gadhiyamanan and @bernhardoj |
Reviewed the details for @rushatgabhane. Approved for $1,500 payment in NewDot based on the BZ summary above. |
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:
should not show red dot and [Attachment] in LHN
Actual Result:
red dot and [Attachment] shows in LHN
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.50-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.Recording.2023-08-01.at.2.08.17.PM.mov
Recording.1441.mp4
Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690879133508289
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: