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] Per diem - Download CSV option is present when there is no per diem rates #53926

Open
8 tasks done
IuliiaHerets opened this issue Dec 11, 2024 · 17 comments
Open
8 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 11, 2024

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: 9.0.74-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a new workspace.
  3. Go to workspace settings > More features.
  4. Enable Per diem.
  5. Upgrade the workspace.
  6. Go to Per diem tab.
  7. Click 3-dot menu.
  8. Click Download CSV.

Expected Result:

Download CSV should be hidden when there is no per diem rates.

Actual Result:

Download CSV is present when there is no per diem rates, which leads to error.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6690697_1733905445641.20241211_162032.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021866977844918023862
  • Upwork Job ID: 1866977844918023862
  • Last Price Increase: 2024-12-11
  • Automatic offers:
    • shubham1206agra | Contributor | 105307270
Issue OwnerCurrent Issue Owner: @
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 11, 2024
Copy link

melvin-bot bot commented Dec 11, 2024

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

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Dec 11, 2024

Edited by proposal-police: This proposal was edited at 2024-12-11 12:58:05 UTC.

Proposal

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

Per diem - Download CSV option is present when there is no per diem rates

What is the root cause of that problem?

We are adding download option to threedotsMenuItems before checking if there are rates (hasVisibleSubRates)

const threeDotsMenuItems = useMemo(() => {
const menuItems = [
{
icon: Expensicons.Table,
text: translate('spreadsheet.importSpreadsheet'),
onSelected: () => {
if (isOffline) {
Modal.close(() => setIsOfflineModalVisible(true));
return;
}
Navigation.navigate(ROUTES.WORKSPACE_PER_DIEM_IMPORT.getRoute(policyID));
},
},
{
icon: Expensicons.Download,
text: translate('spreadsheet.downloadCSV'),
onSelected: () => {
if (isOffline) {

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

We should push the download option to threedotMenuItems only when there are rates

if (hasVisibleSubRates) {

menuItems.push( {
                icon: Expensicons.Download,
                text: translate('spreadsheet.downloadCSV'),
                onSelected: () => {
                    if (isOffline) {
                        Modal.close(() => setIsOfflineModalVisible(true));
                        return;
                    }
                    PerDiem.downloadPerDiemCSV(policyID, () => {
                        setIsDownloadFailureModalVisible(true);
                    });
                },
            })
}

Note: we should add hasVisibleSubRates to threedotsMenuItems useMemo dependency list

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

What alternative solutions did you explore? (Optional)

@joekaufmanexpensify
Copy link
Contributor

Confirmed option to download CSV is hidden for categories and tags when there are none present. We should follow that pattern here!

@joekaufmanexpensify joekaufmanexpensify added the External Added to denote the issue can be worked on by a contributor label Dec 11, 2024
@melvin-bot melvin-bot bot changed the title Per diem - Download CSV option is present when there is no per diem rates [$250] Per diem - Download CSV option is present when there is no per diem rates Dec 11, 2024
Copy link

melvin-bot bot commented Dec 11, 2024

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

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

melvin-bot bot commented Dec 11, 2024

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

@shubham1206agra
Copy link
Contributor

@joekaufmanexpensify Per diem is handled by me. And this will be taken care in cleanup.

@joekaufmanexpensify
Copy link
Contributor

@shubham1206agra Sounds good! Meaning this is already being tracked elsewhere and I can close? Or you want me to assign you to this?

@shubham1206agra
Copy link
Contributor

Assign it to me

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

melvin-bot bot commented Dec 12, 2024

📣 @shubham1206agra 🎉 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 📖

@joekaufmanexpensify
Copy link
Contributor

Assigning @Gonals too as I see you are leading this

@Gonals Gonals added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Dec 12, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

Current assignees @jjcoffee and @shubham1206agra are eligible for the External assigner, not assigning anyone new.

@Gonals Gonals removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 12, 2024
@joekaufmanexpensify
Copy link
Contributor

Pending PR

@melvin-bot melvin-bot bot added the Overdue label Dec 16, 2024
@joekaufmanexpensify
Copy link
Contributor

@shubham1206agra is there an ETA on the PR here?

@melvin-bot melvin-bot bot removed the Overdue label Dec 16, 2024
@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 17, 2024
@shubham1206agra
Copy link
Contributor

@joekaufmanexpensify The priority for this bug is low. I will tackle all the issues in polish PR.

@joekaufmanexpensify
Copy link
Contributor

Got it. I am going to bump this one to weekly then for now as I am OOO after today through the new year. A lot of the team will be too, but if anything urgent comes up that requires BZ, please reach out in Slack. Otherwise I will help with any payments here when I return!

@joekaufmanexpensify joekaufmanexpensify added Weekly KSv2 and removed Daily KSv2 labels Dec 20, 2024
Copy link

melvin-bot bot commented Dec 25, 2024

@Gonals @jjcoffee @joekaufmanexpensify @shubham1206agra 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 Dec 30, 2024
@joekaufmanexpensify
Copy link
Contributor

Still pending prioritization

@melvin-bot melvin-bot bot removed the Overdue label Dec 30, 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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

6 participants