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 2024-10-24] [$250] Expense Details - Square bracket displayed in system message for unapproved expense report #49160
Version Number: 9.0.34-2 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers):biruknew45+906@gmail.com Issue reported by: Applause Internal Team
Action Performed:
Log in as an admin in OldDot.
Create a Collect workspace.
Add user B as an employee.
As the employee, log in to NewDot and submit an expense in the workspace chat.
As the employee, go to the expense details page.
As the admin, go to the expense report in OldDot.
Approve the expense and then unapprove it.
As the employee in NewDot, check the system message when the expense is unapproved.
Expected Result:
The system message should correctly specify that the admin has unapproved the report.
Actual Result:
Square brackets ("[]") are displayed in the system message
@anmurali FYI 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
Edited by proposal-police: This proposal was edited at 2024-09-14 07:08:01 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The system message for unapproved if done from OD shows [].
What is the root cause of that problem?
This is a BE problem. When we receive the unapproved message, the object contains [] as the message. After we refresh, it now looks like this:
For unapproved action, we just show what is inside the action message array. It's different with the approved action where we format it manually and localize it.
if (... && !ReportActionsUtils.isApprovedAction(reportAction)) {
The changes on the FE is done, but the message will show unapproved without any amount and currency and that's because the report action original message of the unapproved from OD has an empty originalMessage.
Compared to the unapproved action done from ND.
So, we need a BE fix too to return the correct originalMessage.
Alternatively, we can get the amount and the currency from the IOU/expense report that is available in ReportActionItem.
changed the title [-]Expense Details - Square bracket displayed in system message for unapproved expense report[/-][+][$250] Expense Details - Square bracket displayed in system message for unapproved expense report[/+]on Sep 25, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.49-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve 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:
[@DylanDylann] The PR that introduced the bug has been identified. Link to the PR:
[@DylanDylann] 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:
[@DylanDylann] 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:
[@DylanDylann] Determine if we should create a regression test for this bug.
[@DylanDylann] 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.
[@anmurali] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
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:
[@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: This change seems like a new improvement, not a bug
[@DylanDylann] 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: NA
[@DylanDylann] 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: NA
[@DylanDylann] Determine if we should create a regression test for this bug. Yes
[@DylanDylann] 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.
Regression Test Proposal
Log in as an admin in OldDot.
Create a Collect workspace.
Add user B as an employee.
As the employee, log in to NewDot and submit an expense in the workspace chat.
As the employee, go to the expense details page.
As the admin, go to the expense report in OldDot.
Approve the expense and then unapprove it.
As the employee in NewDot, check the system message when the expense is unapproved.
Verify that: The system message should correctly specify that the admin has unapproved the report.
Activity
melvin-bot commentedon Sep 13, 2024
Triggered auto assignment to @anmurali (
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.IuliiaHerets commentedon Sep 13, 2024
We think that this bug might be related to #wave-collect - Release 1
IuliiaHerets commentedon Sep 13, 2024
@anmurali FYI 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
bernhardoj commentedon Sep 14, 2024
Edited by proposal-police: This proposal was edited at 2024-09-14 07:08:01 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The system message for unapproved if done from OD shows
[].What is the root cause of that problem?
This is a BE problem. When we receive the unapproved message, the object contains

[]as the message. After we refresh, it now looks like this:For unapproved action, we just show what is inside the action
messagearray. It's different with the approved action where we format it manually and localize it.App/src/pages/home/report/ReportActionItem.tsx
Lines 642 to 643 in 51a64cf
We already has the translation, but we never use it.
App/src/languages/en.ts
Line 4191 in 51a64cf
The translation was added in #43079 but never being used.
What changes do you think we should make in order to solve the problem?
We need to fix this on the FE & BE by using the translations for the unapproved message, so the message is shown correctly and localized.
unapprovedwithiniouobject.getFormattedAmountto accept unapproved action.App/src/libs/ReportUtils.ts
Lines 4447 to 4450 in 51a64cf
The changes on the FE is done, but the message will show

unapprovedwithout any amount and currency and that's because the report action original message of the unapproved from OD has an emptyoriginalMessage.Compared to the unapproved action done from ND.

So, we need a BE fix too to return the correct
originalMessage.Alternatively, we can get the amount and the currency from the IOU/expense report that is available in
ReportActionItem.melvin-bot commentedon Sep 16, 2024
@anmurali Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Sep 18, 2024
@anmurali Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Sep 20, 2024
@anmurali Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Sep 24, 2024
@anmurali 10 days overdue. Is anyone even seeing these? Hello?
melvin-bot commentedon Sep 25, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021838747538236628276
[-]Expense Details - Square bracket displayed in system message for unapproved expense report[/-][+][$250] Expense Details - Square bracket displayed in system message for unapproved expense report[/+]29 remaining items
melvin-bot commentedon Oct 17, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Oct 17, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.49-2 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 2024-10-24. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Oct 17, 2024
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:
DylanDylann commentedon Oct 17, 2024
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:
[@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: This change seems like a new improvement, not a bug
[@DylanDylann] 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: NA
[@DylanDylann] 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: NA
[@DylanDylann] Determine if we should create a regression test for this bug. Yes
[@DylanDylann] 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.
Regression Test Proposal
Do we agree 👍 or 👎
DylanDylann commentedon Oct 28, 2024
Waiting for @anmurali to complete the payments and close
melvin-bot commentedon Oct 28, 2024
@iwiznia, @anmurali, @DylanDylann, @nkdengineer Huh... This is 4 days overdue. Who can take care of this?
iwiznia commentedon Oct 29, 2024
Not overdue, @anmurali needs to pay
anmurali commentedon Oct 29, 2024
Done.