Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: N/A
Reproducible in staging?: N/A
Reproducible in production?: N/A
Email or phone of affected tester (no customers): N/A
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL: N/A
Issue reported by: @garrettmknight
Slack conversation (hyperlinked to channel name): #convert
Action Performed:
1.Submit a few expenses that total $50
2. Report totals $50, system message says ‘submitted $50’
3. Move another $50 expense to the Processing report
4. Report totals $100, report history only shows submitting $50
5. Approve the report
Expected Result:
We shouldn't be duplicating information about the report total when it already exists at the top of the report.
- The submitted system message should simply read "Submitter submitted this report" if they manually submitted or "Submitter submitted this report via delay submission" if it was automatically submitted
- The approved system message should also just read "Approver approved this report" if they manually approved or "Approver approved this report via workspace rules" if it was automatically approved
Let's update the system messages to this:
- User submits a report manually: [Name] submitted
- User submits a report via scheduled submit/delay submission: [Name] submitted via [workflow settings](link to workspace workflow settings help page)
- User approves a report manually: [Name] approved
- User approves a report via auto-approval: [Name] approved via [workspace rules](link to workspace rules settings help page)
- User unapproves a report: [Name] unapproved
Actual Result:
The submitted and approved system messages include the report total, duplicating the information on the report.
Workaround:
Users can use the product, it's just confusing.
Platforms:
All
Screenshots/Videos
Add any screenshot/video evidence
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021902157829644718864
- Upwork Job ID: 1902157829644718864
- Last Price Increase: 2025-03-19
- Automatic offers:
- FitseTLT | Contributor | 106734717
Issue Owner
Current Issue Owner: @ChristinadobrzynMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
melvin-bot commentedon Mar 18, 2025
Triggered auto assignment to @Christinadobrzyn (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.[-]Remove $XX.XX from the submitted system message[/-][+]Remove $XX.XX from the submitted and approved system messages[/+]FitseTLT commentedon Mar 18, 2025
@garrettmknight What about unapproved system messages?
garrettmknight commentedon Mar 18, 2025
Good call, let's update those too - I also just tweaked the copy in the OP.
FitseTLT commentedon Mar 18, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Remove $XX.XX from the submitted and approved system messages
What is the root cause of that problem?
We add the amount for submitted and approved actions here
App/src/libs/ReportUtils.ts
Lines 5378 to 5403 in b0f5f9f
we use these functions to display the report actions and copy to clipboard and so on.
additionally we add amount for the system message in getIOUReportActionMessage here
App/src/libs/ReportUtils.ts
Lines 5515 to 5517 in b0f5f9f
App/src/libs/ReportUtils.ts
Lines 5539 to 5541 in b0f5f9f
App/src/libs/ReportUtils.ts
Lines 5521 to 5523 in b0f5f9f
What changes do you think we should make in order to solve the problem?
We can get the name from displayName of the
reportAction.actorAccountIDvia getDisplayNameForParticipant and can give a fallback of thereportAction.person.textand pass as a param (similar to pay copy here) to new copies that align with the OP for their respective system messages.We use these copies for the above functions
App/src/languages/en.ts
Lines 968 to 970 in b0f5f9f
App/src/languages/en.ts
Lines 985 to 987 in b0f5f9f
For
iou.automaticallySubmittedAmountandiou.automaticallyApprovedAmountwe easily replace the copies to the new copy.But for
iou.submittedAmountandiou.approvedAmountwe use them in other places as getIOUReportActionDisplayMessage which serve other purposes such as the copy to clipboard for money request actions (transaction thread report parent action) hereApp/src/pages/home/report/ContextMenu/ContextMenuActions.tsx
Lines 484 to 490 in b0f5f9f
which currently returns copies with amount and additional comment as
submitted $12.00 for sdfso we might need the amount here so for this case and other cases we need them we can update the copies to handle both cases with and without amount or add a separate copy for these cases needed but we will need to confirm with the initial intention on the current issue.and also remove the amount from approved and unapproved system message here (we can also consider updating it to use the approved/unapproved copy same as we do for submitted message) and update similar to the new copy
App/src/libs/ReportUtils.ts
Lines 5515 to 5517 in b0f5f9f
App/src/libs/ReportUtils.ts
Lines 5521 to 5523 in b0f5f9f
Note: Updating this functions suffices to avoid showing the amount in these system messages but if we are going to update the
reprotAction.messagein getIOUReportActionMessage optimistically as above we will also need update BE (SUBMIT_REPORTAPPROVE_MONEY_REQUESTunapprove) to create the action with the appropriate value consistent with these changes otherwise we can leave the changes of getIOUReportActionMessage and only update the way we display these system message in which case FE changes would be enough.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Test submit and approve actions to assert they create system messages with the appropriate message without amount if we are going to update the optimistic reportAction.message but if we don't we will not add tests as it will only be a copy change.
What alternative solutions did you explore? (Optional)
[-]Remove $XX.XX from the submitted and approved system messages[/-][+][$250] Remove $XX.XX from the submitted and approved system messages[/+]melvin-bot commentedon Mar 19, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021902157829644718864
melvin-bot commentedon Mar 19, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (
External)60 remaining items
melvin-bot commentedon May 7, 2025
@mananjadhav @Christinadobrzyn @mananjadhav The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
mananjadhav commentedon May 11, 2025
This was reverted and on production for a few days. @garrettmknight I think this can now be paid out.
Christinadobrzyn commentedon May 13, 2025
Thanks @mananjadhav do we need a regression test?
mananjadhav commentedon May 15, 2025
@Christinadobrzyn, No we decided to revert this PR. So no regression test and checklist needed. Just needs to be paid out.
Christinadobrzyn commentedon May 15, 2025
Thanks @mananjadhav since the PR reverted I think it's a 50% penalty.
Payment summary here - #58650 (comment)
Please make sure to request payment in ND. Closing this out!
FitseTLT commentedon May 15, 2025
No penalities it is a change of plan no any regression read #58650 (comment) 😄 @Christinadobrzyn
Christinadobrzyn commentedon May 15, 2025
Ah sorry! Thank you! Paying it out in full. Updating the payment summary - #58650 (comment)
mananjadhav commentedon May 15, 2025
Discussed with @Christinadobrzyn on DM and posting it here as well. The revert wasn’t because of a bug but change in requirement and that it’ll be handled as a larger change in another issue.
garrettmknight commentedon May 20, 2025
$250 approved for @mananjadhav