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-02-07] [$500] Tag - Custom name for tag in tag edit message reverts to "tag" after relogin #33493
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor
Version Number: 1.4.16-3 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 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Precondition:
User is an employee of a Collect workspace on OD
The Collect workspace has custom name for Tag
Go to the workspace chat
Create a manual request with an assigned tag
Open request details page
Click on tag
Select a different tag
Log out and log in again
Navigate to the same request details page in Step 3
Expected Result:
The custom name for tag in tag edit message remains as the custom name after relogin
Actual Result:
The custom name for tag in tag edit message reverts to "Tag" after relogin
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Tag - Custom name for tag in tag edit message reverts to "tag" after relogin[/-][+][$500] Tag - Custom name for tag in tag edit message reverts to "tag" after relogin[/+]on Dec 22, 2023
Unluckily, reportActions of MODIFIEDEXPENSE type don't have reportID property so based on above line of code, it can't retrieve the policyID => can't retrieve the name of tag of that policy => return the default name of tag ("Tag") at line 103 above.
We can see the custom name of tag after modifying the tag of an expense report because in the buildOptimisticModifiedExpenseReportAction function, we already add the reportID. But after relogin, this will be reset with the response from BE.
What changes do you think we should make in order to solve the problem?
What changes do you think we should make in order to solve the problem?
Seem like reportID field doesn't exist from action in BE, we should remove this field in optimistic data here and remove the use of reportAction.reportID.
changed the title [-][$500] Tag - Custom name for tag in tag edit message reverts to "tag" after relogin[/-][+][HOLD for payment 2024-02-07] [$500] Tag - Custom name for tag in tag edit message reverts to "tag" after relogin[/+]on Jan 31, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.33-5 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:
[@hoangzinh / @jjcoffee] The PR that introduced the bug has been identified. Link to the PR:
[@hoangzinh / @jjcoffee] 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:
[@hoangzinh / @jjcoffee] 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:
[@hoangzinh / @jjcoffee] Determine if we should create a regression test for this bug.
[@hoangzinh / @jjcoffee] 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.
[@miljakljajic] 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: N/A
Determine if we should create a regression test for this bug. Yes
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
Go to the workspace chat
Create a manual request with an assigned tag
Open request details page
Select a different tag
Verify that the modified expense message shows with a custom name for Tag (I.e "changed the CTag to...")
Log out and log in again
Verify that the modified expense message shows with a custom name for Tag (I.e "changed the CTag to...")
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor
Activity
[-]Tag - Custom name for tag in tag edit message reverts to "tag" after relogin[/-][+][$500] Tag - Custom name for tag in tag edit message reverts to "tag" after relogin[/+]melvin-bot commentedon Dec 22, 2023
Job added to Upwork: https://www.upwork.com/jobs/~012b6267e4a0f872d1
melvin-bot commentedon Dec 22, 2023
Triggered auto assignment to @miljakljajic (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 22, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 22, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (
External)hoangzinh commentedon Dec 22, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Tag - Custom name for tag in tag edit message reverts to "tag" after relogin
What is the root cause of that problem?
reportIDfromreportActionthen get name of tagsApp/src/libs/ModifiedExpenseMessage.ts
Lines 101 to 103 in d70c932
Unluckily, reportActions of
MODIFIEDEXPENSEtype don't havereportIDproperty so based on above line of code, it can't retrieve the policyID => can't retrieve the name of tag of that policy => return the default name of tag ("Tag") at line 103 above.reportID. But after relogin, this will be reset with the response from BE.What changes do you think we should make in order to solve the problem?
reportIDto function ModifiedExpenseMessage.getForReportAction, then use it to retrieve the custom name of tag.There are several places we need to update:
App/src/pages/home/report/ReportActionItem.js
Line 426 in d70c932
App/src/libs/OptionsListUtils.js
Line 411 in d70c932
App/src/libs/Notification/LocalNotification/BrowserNotifications.ts
Line 112 in d70c932
App/src/pages/home/report/ContextMenu/ContextMenuActions.js
Line 292 in d70c932
reportIDfrom the optimistic data hereApp/src/libs/ReportUtils.ts
Line 2962 in 55746c7
Demo:
Screen.Recording.2024-01-10.at.21.34.01.mp4
dukenv0307 commentedon Dec 26, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Custom name for tag in tag edit message reverts to "tag" after relogin
What is the root cause of that problem?
The modified action has
reportIDinoptimisticDatahere but after relogin, BE doesn't returnreportIDfor this action.App/src/libs/ReportUtils.ts
Line 2872 in d65ad48
And then we can not get policyID of transaction thread report via
reportAction.reportIDApp/src/libs/ModifiedExpenseMessage.ts
Line 101 in d65ad48
What changes do you think we should make in order to solve the problem?
Seem like
reportIDfield doesn't exist from action in BE, we should remove this field in optimistic data here and remove the use ofreportAction.reportID.App/src/libs/ReportUtils.ts
Line 2872 in d65ad48
And we should pass
reportIDtogetForReportActionand use this to get the policy of this report.App/src/libs/ModifiedExpenseMessage.ts
Line 101 in d65ad48
What alternative solutions did you explore? (Optional)
melvin-bot commentedon Dec 26, 2023
@jjcoffee, @miljakljajic Whoops! This issue is 2 days overdue. Let's get this updated quick!
33 remaining items
jjcoffee commentedon Jan 25, 2024
PR is in review, just waiting for @hoangzinh to answer a question.
[-][$500] Tag - Custom name for tag in tag edit message reverts to "tag" after relogin[/-][+][HOLD for payment 2024-02-07] [$500] Tag - Custom name for tag in tag edit message reverts to "tag" after relogin[/+]melvin-bot commentedon Jan 31, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 31, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.33-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 2024-02-07. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 31, 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:
jjcoffee commentedon Feb 5, 2024
Regression Test Proposal
Do we agree 👍 or 👎
tgolen commentedon Feb 6, 2024
Sounds good to me 👍
miljakljajic commentedon Feb 7, 2024
Test rail issue submitted, contributors paid, contracts closed. Closing!