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
[Due for payment 2025-06-23] [$250] Rules - "Auto-pay approved reports" feature does not work #62606
Version Number: 9.1.49-6 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail:#60171 Issue reported by: Applause - Internal Team
changed the title [-]Rules - "Auto-pay approved reports" feature does not work[/-][+][$250] Rules - "Auto-pay approved reports" feature does not work[/+]on May 22, 2025
Currently we autoPayApprovedReportsUnavailable works as a flag to determine whether the toggle for auto approval should be locked or not. And this does not include any condition about VBBA.
What changes do you think we should make in order to solve the problem?
Now use this new flag to conditionally disable the toggle option and pass a new subtitle.
currently there are only two subtitles none of which are suitable for the condition when reimbursement choice is true but no bank account is configured.
so add a new subtitle.(we could make add bank account clickable in case)
autoPayApprovedReportsMissingVBBASubtitle: 'Please add a bank account to use this feature',
The exact line could be suggested by the design team.
And update the Option Item
This proposal emphasize on adding an additional subtitle translation to better guide the user about the requirement to enable the feature. Code style could be improved during PR.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: Not critical
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon May 22, 2025
Triggered auto assignment to @twisterdotcom (
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.twisterdotcom commentedon May 22, 2025
The feature auto-pays when you have a VBA, not just marks stuff as paid automatically right? So we should only allow that toggle when you have a VBA.
gijoe0295 commentedon May 22, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-05-23 10:21:44 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The feature auto-pays when you have a VBA, not just marks stuff as paid automatically right? So we should only allow that toggle when you have a VBA.
What is the root cause of that problem?
We allow enabling that toggle when
Make or track paymentis enabled:App/src/pages/workspace/rules/ExpenseReportRulesSection.tsx
Lines 112 to 113 in 34d77b7
App/src/pages/workspace/rules/ExpenseReportRulesSection.tsx
Line 27 in 34d77b7
What changes do you think we should make in order to solve the problem?
Modify the autoPayApprovedReportsUnavailable so that the reimbursement is different from REIMBURSEMENT_CHOICES.REIMBURSEMENT_YES.
Add another condition that the policy must have a VBBA and
policy.areWorkflowsEnabled.App/src/libs/PolicyUtils.ts
Lines 1218 to 1221 in 5935c96
so when the workspace has no bank account, the toggle would show like this:
We need to adjust the subtitle text style to match with other rules:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can add an UI test for the rules in workspace rules page.
What alternative solutions did you explore? (Optional)
None
twisterdotcom commentedon May 22, 2025
Yeah, I like this.
melvin-bot commentedon May 22, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021925688336725193077
[-]Rules - "Auto-pay approved reports" feature does not work[/-][+][$250] Rules - "Auto-pay approved reports" feature does not work[/+]melvin-bot commentedon May 22, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)ChavdaSachin commentedon May 23, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-05-25 18:46:05 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Rules - "Auto-pay approved reports" feature does not work
What is the root cause of that problem?
Missing condition here.
App/src/pages/workspace/rules/ExpenseReportRulesSection.tsx
Line 27 in 409e68e
Currently we
autoPayApprovedReportsUnavailableworks as a flag to determine whether the toggle for auto approval should be locked or not. And this does not include any condition about VBBA.What changes do you think we should make in order to solve the problem?
Update
autoPayApprovedReportsUnavailableflag.Add additional flag
hasPolicyVBBAhere.App/src/libs/PolicyUtils.ts
Line 1218 in 5935c96
Now use this new flag to conditionally disable the toggle option and pass a new subtitle.
currently there are only two subtitles none of which are suitable for the condition when reimbursement choice is true but no bank account is configured.
so add a new subtitle.(we could make
add bank accountclickable in case)The exact line could be suggested by the design team.
And update the Option Item
App/src/pages/workspace/rules/ExpenseReportRulesSection.tsx
Lines 61 to 73 in 409e68e
Note
This proposal emphasize on adding an additional subtitle translation to better guide the user about the requirement to enable the feature. Code style could be improved during PR.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
mountiny commentedon May 23, 2025
@nyomanjyotisa @ahmedGaber93 @Julesssss this is related to your PR I believe #60171
34 remaining items
gijoe0295 commentedon Jun 24, 2025
@twisterdotcom Payment is due.
twisterdotcom commentedon Jun 25, 2025
Payment Summary:
twisterdotcom commentedon Jun 25, 2025
Do we need a checklist @rushatgabhane?
melvin-bot commentedon Jun 30, 2025
@rushatgabhane Huh... This is 4 days overdue. Who can take care of this?
twisterdotcom commentedon Jul 1, 2025
Bump here @rushatgabhane!
rushatgabhane commentedon Jul 1, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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: Adjust copy for various report actions #60171 (comment)
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: Not critical
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/520743
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
garrettmknight commentedon Jul 3, 2025
$250 approved for @rushatgabhane