Open IuliiaHerets opened 21 hours ago
Triggered auto assignment to @zanyrenney (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.
@zanyrenney 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-10-16 19:12:55 UTC.
Rules - Default amounts are set when enabling Rules
In upgradeToCorporate we set default values for maxExpenseAge
, maxExpenseAmount
and maxExpenseAmountNoReceipt
in optimistic data and besides the backend returns those keys in UpgradeToCorporate
request's response
Set the empty string for the. maxExpenseAge
, maxExpenseAmount
and maxExpenseAmountNoReceipt
keys in optimisticData and successData in upgradeToCorporate
const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `policy_${policyID}`,
value: {
...
maxExpenseAge: '',
maxExpenseAmount: '',
maxExpenseAmountNoReceipt: '',
...
},
},
];
const successData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `policy_${policyID}`,
value: {
maxExpenseAge: '',
maxExpenseAmount: '',
maxExpenseAmountNoReceipt: '',
isPendingUpgrade: false,
},
},
];
maxExpenseAge: CONST.POLICY.DEFAULT_MAX_EXPENSE_AGE,
maxExpenseAmount: CONST.POLICY.DEFAULT_MAX_EXPENSE_AMOUNT,
maxExpenseAmountNoReceipt: CONST.POLICY.DEFAULT_MAX_AMOUNT_NO_RECEIPT,
Those values are default values; this seems expected for me.
@marcaaron I also think this is expectation. Could you help to confirm the expectation here?
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: v9.0.49-1 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/5090142 Email or phone of affected tester (no customers): dave0123seife@gmail.com Issue reported by: Applause Internal Team
Action Performed:
As the admin of a USD Control workspace that has never enabled Rules in the past
Expected Result:
When rules are first enabled no default will be set for Require receipt amount, Max expense amount, and Max expense age
Actual Result:
When rules are first enabled default is set for Require receipt amount, Max expense amount, and Max expense age
Workaround:
Unknown
Platforms:
Screenshots/Videos
View all open jobs on GitHub