[$250] Report fields - Feature can be enabled in collect workspace
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.0.46-1 Reproducible in staging?: Y Reproducible in production?: Y Issue reported by: Applause Internal Team
Action Performed:
Precondition: user has Collect workspace.
- Go ws settings > More features
- Enable Accounting
- Go to Accounting > Connect QBO integration
- Disconnect QBO integration
Expected Result:
Report fields, as feature, available in Control workspace, disappeared from LHN.
Actual Result:
Report fields stays in LHN. User can access tab and add report filed to a collect workspace.
Workaround:
Unknown
Platforms:
- [ ] Android: Native
- [ ] Android: mWeb Chrome
- [ ] iOS: Native
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [x] MacOS: Desktop
Screenshots/Videos
https://github.com/user-attachments/assets/cbbe90ce-9229-4bc8-bd13-f8097e24a664
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021844128989949063152
- Upwork Job ID: 1844128989949063152
- Last Price Increase: 2024-10-23
- Automatic offers:
- allgandalf | Reviewer | 104633600
- mkzie2 | Contributor | 104633601
Issue Owner
Current Issue Owner: @allgandalf
Triggered auto assignment to @slafortune (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.
We think that this bug might be related to #wave-control
@slafortune 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-09 21:40:29 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
- Report fields stays in LHN. User can access tab and add report filed to a collect workspace.
What is the root cause of that problem?
- When removing any connection, we didn't turn off report field feature if it is not control policy:
https://github.com/Expensify/App/blob/3a6676eb0b8d241cbc94e3b64424c8c9a9ae7e0a/src/libs/actions/connections/index.ts#L22
What changes do you think we should make in order to solve the problem?
- Add an additional logic to line:
const isCollectWorkspace = policy.type === 'team';
if (isCollectWorkspace && ['quickbooksOnline', 'xero', 'quickbooksDesktop'].includes(connectionName)) {
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
value: {
areReportFieldsEnabled: false,
pendingFields: {
areReportFieldsEnabled: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE,
},
},
});
successData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
value: {
pendingFields: {
areReportFieldsEnabled: null,
},
},
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
value: {
areReportFieldsEnabled: policy?.areReportFieldsEnabled,
pendingFields: {
areReportFieldsEnabled: null,
},
},
});
}
- BE should fix it as well. In detail, when we disconnect, BE needs to turn off report field feature as well.
Job added to Upwork: https://www.upwork.com/jobs/~021844128989949063152
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allgandalf (External)
@slafortune , a thought:
- We should never allow the toggle of
report fieldsunless the workspace itself in on acontrol plan, it's acontrol planonly feature, can you take it to our slack#expensechannel and tag me there? the expected result doesn't seem right, please tag me there too
@slafortune, @allgandalf Eep! 4 days overdue now. Issues have feelings too...
bump on ^ @slafortune
Report fields are a control feature, moving this to #expense.
Perfect since everything Collect or Control is going to the Expenses Project
Sorry for my delay @allgandalf
We should never allow the toggle of report fields unless the workspace itself in on a control plan, it's a control plan only feature, can you take it to our slack #expense channel and tag me there? the expected result doesn't seem right, please tag me there too
Report fields unrelated to any accounting integrations are not supported on the Collect workspace This bug had been related to the Collect workspace project since the QBO connection is allowed on the Collect workspace - which allows for report fields.
if connected to an accounting integration that is allowed on the collect workspace - report fields are enabled. When disconnecting - report fields should be removed.
Sorry - some keyboard shortcut closed that π±
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@allgandalf did this clear up any questions you had? Do you still want me to start a conversation in Slack?
oops, i missed your response, I will review your comments and get back today
I agree with @mkzie2 proposal here, We should disable the report fields. @mkzie2 please use a const while checking isCollectWorkspace also we have predefined const for connection names, use that.
I also agree that BE should be updated to match the optimistic change we make on the FE.
πππ C+ reviewed
Triggered auto assignment to @stitesExpensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@slafortune @stitesExpensify @allgandalf 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!
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@dangrous do you have more context about what is happening here? I'm not really sure I understand what backend changes would need to be made
Not sure I know too much more than you haha - but basically, (I think) connecting New Dot to QBO will enable report fields on the policy, even if it's Collect not Control (normally report fields are Control only). When we disconnect QBO (command RemovePolicyConnection) we should therefore check if the policy is Collect, and, if it is, setReportFieldsEnabled to false. I'm guessing the best place for that is here?
Does that make sense?
Also cc @aldo-expensify
@slafortune, @stitesExpensify, @allgandalf Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Waiting for assignment melv!
Exactly what @dangrous said - any collect plan connected to QBO will have report fields enabled, but if the connection is gone, the report fields should also be removed since they are not available with the collect plan in a standalone way. @stitesExpensify do you agree here
π£ @allgandalf π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @mkzie2 π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
I do agree! I'm not sure when I will be able to prioritize this though FYI
Draft PR above ^. Waiting for BE changes.
@slafortune, @stitesExpensify, @allgandalf, @mkzie2 Whoops! This issue is 2 days overdue. Let's get this updated quick!