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

[HOLD for payment 2024-05-14][$250] Send invoice - Hide visibility and room name fields in the Settings page of the Invoice room #41280

Closed
4 of 6 tasks
lanitochka17 opened this issue Apr 30, 2024 · 39 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Apr 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: 1.4.68-0
Reproducible in staging?: Y
Reproducible in production?: N
**If this was caught during regression testing, add the test name, ID and link from TestRail:**N/A
Issue reported by: Applause - Internal Team

Issue found when executing PR #40015

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to FAB > Send invoice
  3. Enter amount and select a participant
  4. Create the invoice
  5. Click on the workspace chat header
  6. Go to Settings > Visibility
  7. Change to a different visibility

Expected Result:

Invoice workspace chat should not show visibility settings if it cannot be changed

Actual Result:

Invoice workspace chat shows visibility settings and it always reverts to "Private"

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Add any screenshot/video evidence

Bug6466105_1714440134762.bandicam_2024-04-30_09-19-02-277.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a3de929b3f13fc60
  • Upwork Job ID: 1785187069614149632
  • Last Price Increase: 2024-04-30
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Apr 30, 2024
Copy link

melvin-bot bot commented Apr 30, 2024

Triggered auto assignment to @robertjchen (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@lanitochka17
Copy link
Author

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

@shubham1206agra
Copy link
Contributor

Related to #40303

@robertjchen
Copy link
Contributor

Does not appear to be a serious deploy blocker to me and should be addressable by external contributors 👍

@robertjchen robertjchen added External Added to denote the issue can be worked on by a contributor Daily KSv2 and removed Hourly KSv2 labels Apr 30, 2024
Copy link

melvin-bot bot commented Apr 30, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01a3de929b3f13fc60

@melvin-bot melvin-bot bot changed the title Send invoice - Visibility settings always reverts to "Private" [$250] Send invoice - Visibility settings always reverts to "Private" Apr 30, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 30, 2024
Copy link

melvin-bot bot commented Apr 30, 2024

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

@allgandalf
Copy link
Contributor

allgandalf commented Apr 30, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Changing visibility on BE is not allowed for invoice yet we do not block it on FE

What is the root cause of that problem?

we decide whether to change visibility or not based on the boolean shouldAllowChangeVisibility

(shouldAllowChangeVisibility ? (
<MenuItemWithTopDescription
shouldShowRightIcon
title={translate(`newRoomPage.visibilityOptions.${report.visibility}`)}
description={translate('newRoomPage.visibility')}
onPress={() => Navigation.navigate(ROUTES.REPORT_SETTINGS_VISIBILITY.getRoute(report.reportID))}
/>

shouldAllowChangeVisibility takes value from
const shouldAllowChangeVisibility = useMemo(() => ReportUtils.canEditRoomVisibility(report, linkedWorkspace), [report, linkedWorkspace]);

Here we do not check if the report chatType is of invoice.

What changes do you think we should make in order to solve the problem?

We need to add a extra condition to check if report chatType is invoice and block changing the visibility based on that value:

--- a/src/pages/settings/Report/ReportSettingsPage.tsx
+++ b/src/pages/settings/Report/ReportSettingsPage.tsx
@@ -41,11 +41,9 @@ function ReportSettingsPage({report, policies}: ReportSettingsPageProps) {
  
-    const shouldAllowChangeVisibility = useMemo(() => ReportUtils.canEditRoomVisibility(report, linkedWorkspace), [report, linkedWorkspace]);
-
+    const shouldAllowChangeVisibility = useMemo(() => ReportUtils.canEditRoomVisibility(report, linkedWorkspace), [report, linkedWorkspace]) && report.chatType !== CONST.REPORT.CHAT_TYPE.INVOICE;

What alternative solutions did you explore? (Optional)

We can update the check report.chatType !== CONST.REPORT.CHAT_TYPE.INVOICE in the canEditRoomVisibility reportUtils as well:

App/src/libs/ReportUtils.ts

Lines 5705 to 5707 in d299b32

function canEditRoomVisibility(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>): boolean {
return PolicyUtils.isPolicyAdmin(policy) && !isArchivedRoom(report);
}

@waterim
Copy link
Contributor

waterim commented Apr 30, 2024

Hey, Im Artem from Callstack and would like to take this issue
cc @cristipaval

@allgandalf
Copy link
Contributor

isn’t this issue external? @waterim ?

@waterim
Copy link
Contributor

waterim commented Apr 30, 2024

isn’t this issue external? @waterim ?

Yes, this one can be taken by someone External, will jump to the other issues

@cristipaval
Copy link
Contributor

this is #vip-billpay related. @danielrvidal could you please help prioritze?

@danielrvidal
Copy link
Contributor

This is a solid clean up item, but given it's not breaking the room I'm assigning it a Medium.

@danielrvidal
Copy link
Contributor

Awesome, looks like this should be good to go and on staging tomorrow. Thank you!

@rushatgabhane
Copy link
Member

@cristipaval could you please attach payment summary for this issue 🙇

@cristipaval
Copy link
Contributor

Payment summary:

@rushatgabhane for the C+ review
@GandalfGwaihir for the fix

Note: I don't think this is a regression as it was not clear in the initial design that we were going to hide these for the invoice rooms

@cristipaval cristipaval added the Bug Something is broken. Auto assigns a BugZero manager. label May 9, 2024
Copy link

melvin-bot bot commented May 9, 2024

Triggered auto assignment to @miljakljajic (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.

@cristipaval cristipaval removed the Reviewing Has a PR in review label May 9, 2024
@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 9, 2024
@cristipaval cristipaval added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels May 9, 2024
@cristipaval
Copy link
Contributor

@miljakljajic Could you please help with this when it gets due?

@cristipaval cristipaval changed the title [$250] Send invoice - Hide visibility and room name fields in the Settings page of the Invoice room [HOLD for payment 2024-05-14][$250] Send invoice - Hide visibility and room name fields in the Settings page of the Invoice room May 9, 2024
@miljakljajic
Copy link
Contributor

Thank you, I will!

@melvin-bot melvin-bot bot added the Overdue label May 13, 2024
@cristipaval
Copy link
Contributor

tomorrow is the payment day, Melv

@melvin-bot melvin-bot bot removed the Overdue label May 13, 2024
Copy link

melvin-bot bot commented May 14, 2024

Payment Summary

Upwork Job

  • Reviewer: @rushatgabhane owed $250 via NewDot
  • ROLE: @GandalfGwaihir paid $(AMOUNT) via Upwork (LINK)

BugZero Checklist (@miljakljajic)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1785187069614149632/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@miljakljajic
Copy link
Contributor

Issuing these payments!

@miljakljajic
Copy link
Contributor

@rushatgabhane owed 250 for their work

@GandalfGwaihir paid in upwork.

closing!

@rushatgabhane
Copy link
Member

@miljakljajic this should be $500 right? Because critical issue

@miljakljajic
Copy link
Contributor

Sorry @rushatgabhane

Updated payment summary:

@rushatgabhane owed 250 for their work

@GandalfGwaihir I will issue a bonus to cover the outstanding amount

@miljakljajic
Copy link
Contributor

Paid the outstanding 250 USD via an upwork bonus to @GandalfGwaihir

@rushatgabhane
Copy link
Member

rushatgabhane commented May 25, 2024

@miljakljajic i get that you've mentioned i owe 250 extra.
But for clarity, could you please confirm that im owed 500 for this issue?

@JmillsExpensify
Copy link

Agreed, we still need a payment summary with the $500 amounts.

@miljakljajic
Copy link
Contributor

@rushatgabhane is owed 500 USD for their work on this issue

I'm so sorry - I didn't mean to type 250, total mistake on my part

@JmillsExpensify
Copy link

$500 approved for @rushatgabhane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Development

No branches or pull requests