You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-07-20] [$1000] [Attachment] shows in LHN even after close error message #19913
in LHN still shows [Attachment] even after close error message
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?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.21-2 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
What changes do you think we should make in order to solve the problem?
To resolve this issue, we simply update the lastMessageText in this function just like we do while deleting a report action. This is what the function would look like,
/** * @param {String} reportID * @param {Object} reportAction */functionclearReportActionErrors(reportID,reportAction){if(reportAction.pendingAction===CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD){// Delete the optimistic actionconstoptimisticReportAction={[reportAction.reportActionID]: null,};// Update the report's last messageconstoptimisticReport={lastMessageText: '',lastVisibleActionCreated: '',};constlastMessageText=ReportActionsUtils.getLastVisibleMessageText(reportID,optimisticReportAction);if(lastMessageText.length>0){constlastVisibleActionCreated=ReportActionsUtils.getLastVisibleAction(reportID,optimisticReportAction).created;optimisticReport.lastMessageText=lastMessageText;optimisticReport.lastVisibleActionCreated=lastVisibleActionCreated;}Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`,optimisticReport);Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`,optimisticReportAction);// If there's a linked transaction, delete that tooconstlinkedTransactionID=ReportActionsUtils.getLinkedTransactionID(reportID,reportAction.reportActionID);if(linkedTransactionID){Onyx.set(`${ONYXKEYS.COLLECTION.TRANSACTION}${linkedTransactionID}`,null);}return;}Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`,{[reportAction.reportActionID]: {errors: null,},});}
Note: We could optimise this by creating a function in ReportActionsUtils.js to format the last message, this way we will only have to call getLastVisibleAction instead of getLastVisibleMessageText as well.
What alternative solutions did you explore? (Optional)
I tried to reproduce it with multiple corrupt files and couldn't reproduce it. @kavimuru@mananjadhav, can you please attach the corrupt file you used to this issue? I would like to try it before dismissing the bug. Thanks!
changed the title [-] [Attachment] shows in LHN even after close error message[/-][+][$1000] [Attachment] shows in LHN even after close error message[/+]on Jun 2, 2023
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:
[@rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
[@rushatgabhane] 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:
[@rushatgabhane] 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:
[@rushatgabhane] Determine if we should create a regression test for this bug.
[@rushatgabhane] 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.
[@isabelastisser] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
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: Not required
Determine if we should create a regression test for this bug. Sure
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
Click on any chat-based report in LHN to view the report screen.
Click on the actions button on the footer to show the actions menu.
Click on the 'Send` button in the Attachment modal to send the attachment.
Note that the sidebar screen in LHN for this chat report will show '[Attachment]'. Further, the 'Uploading Attachment' chat comes up in the chat report screen.
Once the attachment upload fails due to the corrupt file, we will observe a failure comment with "Unexpected error..."
At this time, verify that the sidebar screen in LHN for this chat report displays the last successful message instead of '[Attachment]'.
@isabelastisser Can you please summarize the appropriate individual payments for all parties involved in this issue? This is holding up @rushatgabhane's NewDot payments. More information on this compliance process in Slack.
Activity
melvin-bot commentedon May 31, 2023
Triggered auto assignment to @isabelastisser (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon May 31, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)therealsujitk commentedon May 31, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The last message in the LHN doesn't get updated when a report action is removed by the user due to an error.
What is the root cause of that problem?
The reason for this is that we are not updating the report's
lastMessageTextwhile deleting the report action in Onyx in the function below.App/src/libs/actions/ReportActions.js
Lines 6 to 31 in 06192ac
What changes do you think we should make in order to solve the problem?
To resolve this issue, we simply update the
lastMessageTextin this function just like we do while deleting a report action. This is what the function would look like,What alternative solutions did you explore? (Optional)
None.
isabelastisser commentedon Jun 2, 2023
I tried to reproduce it with multiple corrupt files and couldn't reproduce it. @kavimuru @mananjadhav, can you please attach the corrupt file you used to this issue? I would like to try it before dismissing the
bug. Thanks!therealsujitk commentedon Jun 2, 2023
@isabelastisser you can find it in the slack discussion, here's the link to the file. I'm still able to reproduce this in staging.
isabelastisser commentedon Jun 2, 2023
Thanks and yep, I can reproduce it!
[-] [Attachment] shows in LHN even after close error message[/-][+][$1000] [Attachment] shows in LHN even after close error message[/+]melvin-bot commentedon Jun 2, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01da8eae4fb504ea71
melvin-bot commentedon Jun 2, 2023
Current assignee @isabelastisser is eligible for the External assigner, not assigning anyone new.
105 remaining items
melvin-bot commentedon Jul 13, 2023
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:
rushatgabhane commentedon Jul 13, 2023
Agree with @rojiphil #19913 (comment) that this qualifies for a bonus
isabelastisser commentedon Jul 21, 2023
The offers were sent in Upwork, please accept, and I will process the payments.
@rushatgabhane, please complete the BZ checklist asap and I will close this issue. Thanks!
gadhiyamanan commentedon Jul 21, 2023
@isabelastisser offer accepted, thanks!
rojiphil commentedon Jul 21, 2023
@isabelastisser Accepted Offer. Thanks.
isabelastisser commentedon Jul 21, 2023
Payments were processed in Upwork.
C+ payment will be made via NewDot upon BZ checklist completion. cc @rushatgabhane
rushatgabhane commentedon Jul 23, 2023
The PR that introduced the bug has been identified. Link to the PR: https://github.com/Expensify/App/pull/13118/files#diff-8afe5b71ee0436c21364148c86dadd640f2bff3e3d916addbb1f1f6f7e5b6a43
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: https://github.com/Expensify/App/pull/13118/files#r1271466486
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: Not required
Determine if we should create a regression test for this bug. Sure
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
rushatgabhane commentedon Jul 23, 2023
made a manual request on new dot https://staging.new.expensify.com/r/1523003362514356
isabelastisser commentedon Jul 24, 2023
https://github.com/Expensify/Expensify/issues/302488
all set!
JmillsExpensify commentedon Jul 27, 2023
@isabelastisser Can you please summarize the appropriate individual payments for all parties involved in this issue? This is holding up @rushatgabhane's NewDot payments. More information on this compliance process in Slack.
isabelastisser commentedon Jul 31, 2023
Payment summary:
Issue reported by @gadhiyamanan - $250
C+ review @rushatgabhane - $1000 for review, $500 urgency bonus
Issue fixed by @rojiphil - $1000 for accepted proposal, $500 urgency bonus
JmillsExpensify commentedon Jul 31, 2023
Reviewed details for @rushatgabhane. These details are accurate based on summary from Business Reviewer and are now approved for payment in NewDot.