-
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 2024-04-29] [$500] [Held requests] System message for hold request shows a comma as reason #38583
Comments
Triggered auto assignment to @joekaufmanexpensify ( |
@joekaufmanexpensify 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. |
We think that this bug might be related to #wave-collect - Release 1 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Hold request - System message for hold request shows a comma as reason What is the root cause of that problem?When we create optimistic hold report action we set the What changes do you think we should make in order to solve the problem?Take the index
What alternative solutions did you explore? (Optional)Since implementing above changes causes a delay in displaying the comment because the index
|
ProposalPlease re-state the problem that we are trying to solve in this issue.System message for hold request shows a comma as reason What is the root cause of that problem?When we submit the Hold reason first time, we store it at the What changes do you think we should make in order to solve the problem?Update the condition to check if the 3rd index exits and if not then display the text at the 1st index: App/src/pages/home/report/ReportActionItem.tsx Lines 519 to 520 in 34fa987
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.HOLD) {
console.log('action.message:', action.message);
children = <ReportActionItemBasicMessage message={translate('iou.heldRequest', {comment: action.message?.[3]?.text ?? action.message?.[1].text})} />;
} What alternative solutions did you explore? (Optional)N/A |
Def seems like a bug. |
Job added to Upwork: https://www.upwork.com/jobs/~01b056a4fad087d390 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mkhutornyi ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The system message for hold request briefly shows the entered reason, then it changes to a comma. What is the root cause of that problem?The optimistic data of hold action is different from the data that is returned by server Lines 3690 to 3695 in 014557c
And we're displaying the comment base on optimistic data App/src/pages/home/report/ReportActionItem.tsx Lines 519 to 520 in 4ac5d6c
So after the hold API is complete, the comment is replaced by What changes do you think we should make in order to solve the problem?We should sync the data that in optimisticData with the data that is returned by server like this
Lines 3690 to 3695 in 014557c
And then here we will get the comment of hold action through the fourth element of message array App/src/pages/home/report/ReportActionItem.tsx Lines 519 to 520 in 4ac5d6c
Also update the same here.
OPTIONAL: To only need to update in one place when the format of hold action changes, we can create a util like What alternative solutions did you explore? (Optional)NA |
ProposalPlease re-state the problem that we are trying to solve in this issue.The system message for hold request briefly shows the entered reason, then it changes to a comma. This is due to a mismatch between the optimistic data and the data returned by the server. What is the root cause of that problem?The root cause is that the optimistic data and the server response have different formats for the message array. The optimistic data assumes the comment is at index 1, while the server returns the comment at index 3. This one is a regression from #33897
What changes do you think we should make in order to solve the problem?This one is a bit deep. If we modify the optimistic data structure to have the comment at index 3, the UI would initially display an empty or incorrect comment until the server response arrives. This is because the code that renders the comment would be looking for it at index 3, which doesn't exist in the optimistic data. Safest approach seems:
What alternative solutions did you explore? (Optional)We can consider updating the server response format to match the optimistic data structure, placing the comment at index 1. This would eliminate the need for the fallback logic in the UI and ensure consistency between the optimistic data and the server response. Personally believe this is the correct approach. As you can see in this picture, when we send the info to the server, we have the So BE change could be either:
|
@mkhutornyi thoughts on proposals? |
bump @mkhutornyi when you have a sec |
I will provide update today |
I agree with @nkdengineer's proposal to make optimistic data and server data always consistent. |
Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I also agree. After making the data consistent I think that we should also implement the alternate solution when getting the hold comment, so that it's more robust against breaking changes in the future. |
📣 @mkhutornyi 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
PR on staging |
Automation was not working, but this is now ready for payment! |
Discussing payment next steps, since original C+ went OOO unexpectedly. |
We discussed in slack, and we landed on 50/50 split for both C+, since @mkhutornyi reviewed proposals, and @thesahindia reviewed the PR. |
That means we need to pay:
|
OG upwork job is closed, so made a new one: https://www.upwork.com/jobs/~01c5d794e2115e005d |
@nkdengineer offer sent for $500! |
@mkhutornyi offer sent for $250! |
@thesahindia please request $250 via NewDot and confirm here once complete |
Bump @nkdengineer @mkhutornyi @thesahindia , please take the next steps above so we can pay you |
@joekaufmanexpensify I accepted the offer 🙏 |
Great. TY! |
@nkdengineer $500 sent and contract ended! |
@mkhutornyi still waiting for you to accept our offer, and @thesahindia for you to request payment via NewDot. Moving to weekly for now while this is pending |
Hey @joekaufmanexpensify, I have added this to my list, I will send the money request soon. You can close this after paying others! |
Sounds good. Payment summary is here. Payments outstanding still are @thesahindia's (which he needs to request). @mkhutornyi's payment is also outstanding. I see in slack they've been out for over a month, and we're not sure when they'll be back, so going to close this for now. @mkhutornyi once you're back, please comment here, and I will re-open this issue to send your payment for this issue! |
$250 approved for @thesahindia |
@mkhutornyi is back, I paid them $250 via Upwork, the contract was still open. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
**Version Number:**1.4.54-1
Reproducible in staging?: y
Reproducible in production?: y
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The system message for hold request will show the entered reason.
Actual Result:
The system message for hold request briefly shows the entered reason, then it changes to a comma.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6419227_1710853518973.bandicam_2024-03-19_21-02-32-738.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: