Open IuliiaHerets opened 1 week ago
Triggered auto assignment to @sakluger (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.
The upgrader is mentioned in a separate whisper message, that is only displayed briefly. In the system message the upgrader is not mentioned.
When we call API UpgradeToCorporate
, BE returns message
in reportAction
But when we call API OpenReport
, BE returns message
as []
in reportAction
We should handle the action of this report Action is POLICYCHANGELOG_CORPORATE_UPGRADE
in the front end
This solves 2 problems: handling cases where BE returns missing message
like this issue and being able to translate them into Spanish
corporateUpdate
ReportUtils
function getCorporateUpdateMessage(reportAction: ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_CORPORATE_UPGRADE>) {
return Localize.translateLocal('corporateUpdate');
}
3. Do the same way as we do for other actions to add a case for the corporate update in other places
In `ReportActionItem` [here](https://github.com/Expensify/App/blob/d5a7b499d3ba2074f5ad069ed27a043d029d7036/src/pages/home/report/ReportActionItem.tsx#L698)
else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_CORPORATE_UPGRADE) {
children =
In `OptionsListUtils.ts` [here](https://github.com/Expensify/App/blob/d5a7b499d3ba2074f5ad069ed27a043d029d7036/src/libs/OptionsListUtils.ts#L648)
if (parentReportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_CORPORATE_UPGRADE) { return getCorporateUpdateMessage(parentReportAction); }
In `ContextMenuActions.tsx` [here](https://github.com/Expensify/App/blob/d5a7b499d3ba2074f5ad069ed27a043d029d7036/src/pages/home/report/ContextMenu/ContextMenuActions.tsx#L484)
else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_CORPORATE_UPGRADE) { const displayMessage = ReportUtils.getCorporateUpdateMessage(reportAction); Clipboard.setString(displayMessage);
### What alternative solutions did you explore? (Optional)
<!---
ATTN: Contributor+
You are the first line of defense in making sure every proposal has a clear and easily understood problem with a "root cause". Do not approve any proposals that lack a satisfying explanation to the first two prompts. It is CRITICALLY important that we understand the root cause at a minimum even if the solution doesn't directly address it. When we avoid this step we can end up solving the wrong problems entirely or just writing hacks and workarounds.
Instructions for how to review a proposal:
1. Address each contributor proposal one at a time and address each part of the question one at a time e.g. if a solution looks acceptable, but the stated problem is not clear then you should provide feedback and make suggestions to improve each prompt before moving on to the next. Avoid responding to all sections of a proposal at once. Move from one question to the next each time asking the contributor to "Please update your original proposal and tag me again when it's ready for review".
3. Limit excessive conversation and moderate issues to keep them on track. If someone is doing any of the following things please kindly and humbly course-correct them:
- Posting PRs.
- Posting large multi-line diffs (this is basically a PR).
- Skipping any of the required questions.
- Not using the proposal template at all.
- Suggesting that an existing issue is related to the current issue before a problem or root cause has been established.
- Excessively wordy explanations.
5. Choose the first proposal that has a reasonable answer to all the required questions.
-->
Pulling out a few screenshots from the reproduction video so it's easier to see what's going on here. Here's the #admins
room chat showing the upgrade system message:
And here's the same admins room seconds later, after the system message disappeared:
Job added to Upwork: https://www.upwork.com/jobs/~021857185698447287009
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (External
)
Looks like BE is resetting the reportAction.message to intentionally hide it but if we want to avoid hiding then it should be handled in BE 👍
@Ollyws can you please confirm if this needs to be handled in BE? If so, I can change to internal
.
@sakluger, @Ollyws Whoops! This issue is 2 days overdue. Let's get this updated quick!
@sakluger Yeah seems this is a BE issue as the message object is empty.
We have a ton of POLICYCHANGELOG
system messages and as far as I know, they're all created and stored API-side and the workspace changes require access to backend code. I'm going to mark internal for now, but if it turns out that @daledah's front-end solution will work, we can switch it back.
cc @yuwenmemon I'm not sure if you need to work on this, but you are super familiar with workspace change logs so I'm tagging you in case you know what might be the issue.
Ooh weird. Yeah I can take a look at this...
@yuwenmemon let me know if you think we need to change to weekly.
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: 9.0.62-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: https://expensify.testrail.io/index.php?/tests/view/5223810 Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
User is navigated to the #admins room, the upgrade system messages have posted, including a message from Expensify mentioning the upgrader.
Actual Result:
The upgrader is mentioned in a separate whisper message, that is only displayed briefly. In the system message the upgrader is not mentioned.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/bd868c03-7ccb-47a5-aa30-01d70d99e7b6
https://github.com/user-attachments/assets/c8edf4a2-a6bb-49a8-b872-8126e14e73c3
View all open jobs on GitHub
Upwork Automation - Do Not Edit