Skip to content
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

[$250] Expense- RBR gets shown for advanced approval enabled expense if default currency is changed #48328

Closed
3 of 6 tasks
IuliiaHerets opened this issue Aug 30, 2024 · 21 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Aug 30, 2024

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.26-4
Reproducible in staging?: Y
Reproducible in production?: Y
Issue was found when executing this PR: #47926
Email or phone of affected tester (no customers): Owner: applausetester+nl518@applause.expensifail.com
Submitter: applausetester+nl520@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

Pre-condition: Default workspace currency should be other currency than USD.

  1. Navigate to Old Dot (staging.expensify.com/inbox)
  2. Sign up with a new account
  3. Create a control workspace
  4. Enable workspace chat for new dot by running the code below inside the console.
    p = Policy.getCurrent();
    p.policy.isPolicyExpenseChatEnabled = "true";
    p.save();
  5. Go to reports and change the default currency to USD
  6. Go to members and enable advanced approvals
  7. Invite a member as an employee and make it submit to the owner
  8. Invite another member as an employee but make it submit to the member invited on step 7
  9. Navigate to New Dot (staging.new.expensify.com)
  10. Sign in as the member (submitter) invited on step 8.
  11. Go to workspace chat and submit a manual expense

Expected Result:

The submitted expense doesn't show any errors or RBR

Actual Result:

RBR is shown on the expense preview component, on the LHN and there is an error inside the expense report.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6587703_1725018593906.bandicam_2024-08-30_14-32-20-637.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01510356bd8e22c968
  • Upwork Job ID: 1829578766264533133
  • Last Price Increase: 2024-09-06
  • Automatic offers:
    • akinwale | Reviewer | 103886034
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 30, 2024
Copy link

melvin-bot bot commented Aug 30, 2024

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.

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-control

@IuliiaHerets
Copy link
Author

@sakluger 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

@sakluger sakluger added the External Added to denote the issue can be worked on by a contributor label Aug 30, 2024
@melvin-bot melvin-bot bot changed the title Expense- RBR gets shown for advanced approval enabled expense if default currency is changed [$250] Expense- RBR gets shown for advanced approval enabled expense if default currency is changed Aug 30, 2024
Copy link

melvin-bot bot commented Aug 30, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01510356bd8e22c968

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 30, 2024
Copy link

melvin-bot bot commented Aug 30, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External)

@sakluger
Copy link
Contributor

I'm adding the external label, but I wonder if this is a BE error.

Copy link

melvin-bot bot commented Sep 2, 2024

@akinwale, @sakluger Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Sep 2, 2024
Copy link

melvin-bot bot commented Sep 4, 2024

@akinwale, @sakluger Huh... This is 4 days overdue. Who can take care of this?

@sakluger
Copy link
Contributor

sakluger commented Sep 4, 2024

No proposals yet.

@sakluger
Copy link
Contributor

sakluger commented Sep 6, 2024

Still no proposals. I'll post in wave-control in Slack on Monday if we don't get any by then.

@melvin-bot melvin-bot bot removed the Overdue label Sep 6, 2024
Copy link

melvin-bot bot commented Sep 6, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Sep 9, 2024
@kubabutkiewicz
Copy link
Contributor

Hi, I’m Jakub from Callstack and I would like to work on this issue.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

📣 @akinwale 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
@sakluger
Copy link
Contributor

sakluger commented Sep 9, 2024

Thanks @kubabutkiewicz! Let us know what you find.

Copy link

melvin-bot bot commented Sep 9, 2024

@akinwale, @sakluger Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@kubabutkiewicz
Copy link
Contributor

kubabutkiewicz commented Sep 10, 2024

Hey, I am not able to reproduce original issue. @IuliiaHerets are you still able to reproduce that?
But while investigating I stumble upon two other issues, one is I think backend issue.
I went through steps to reproduce original issue after submitting money request it got automatically approved, while every next request didn't. When I checked response from OpenReport command it had message that request is approved

SCR-20240910-labb

Second seems to be a frontend issue, after creating a money request it the preview has RBR but when I go to the details I don't see any message why it have RBR, after checking code and onyx state it seems to be caused by this
SCR-20240910-knpz
And this is added here as an optimistic update

App/src/libs/actions/IOU.ts

Lines 472 to 502 in fe4d19e

function getFieldViolationsOnyxData(iouReport: OnyxTypes.Report): SetRequired<OnyxData, 'optimisticData' | 'failureData'> {
const missingFields: OnyxTypes.ReportFieldsViolations = {};
const excludedFields = Object.values(CONST.REPORT_VIOLATIONS_EXCLUDED_FIELDS) as string[];
Object.values(iouReport.fieldList ?? {}).forEach((field) => {
if (excludedFields.includes(field.fieldID) || !!field.value || !!field.defaultValue) {
return;
}
// in case of missing field violation the empty object is indicator.
missingFields[field.fieldID] = {};
});
return {
optimisticData: [
{
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.REPORT_VIOLATIONS}${iouReport.reportID}`,
value: {
fieldRequired: missingFields,
},
},
],
failureData: [
{
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.REPORT_VIOLATIONS}${iouReport.reportID}`,
value: null,
},
],
};
}

But I believe its different than the original issue and this is not reproducible constantly
Should I work on the second issue then? @sakluger

@IuliiaHerets
Copy link
Author

@kubabutkiewicz Tester can't reproduce this issue in the latest build

bandicam.2024-09-11.10-37-04-828.mp4

@kubabutkiewicz
Copy link
Contributor

Hi, I will be ooo for the next 2 weeks, I believe its nothing to do here anymore, but if yes let me know

Copy link

melvin-bot bot commented Sep 13, 2024

@akinwale @sakluger @kubabutkiewicz this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Sep 13, 2024
Copy link

melvin-bot bot commented Sep 16, 2024

@akinwale, @sakluger, @kubabutkiewicz Huh... This is 4 days overdue. Who can take care of this?

@sakluger
Copy link
Contributor

@kubabutkiewicz feel free to report the second issue as a new bug if you're able to reproduce it. I'm going to close this GH issue since the originally reported bug isn't reproducible anymore.

@melvin-bot melvin-bot bot removed the Overdue label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

4 participants