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

Per diem - Inconsistency in description formatting when submitting per diem offline and online #55406

Closed
4 of 8 tasks
vincdargento opened this issue Jan 17, 2025 · 13 comments
Closed
4 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review

Comments

@vincdargento
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Issue was found while executing QA for PR #54760

Version Number: 9.0.87-0
Reproducible in staging?: Yes
Reproducible in production?: Unable to check
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: #54760
Email or phone of affected tester (no customers): Mac 15.0 / Chrome
Issue reported by: Applause Internal Team
Device used: applausetester+100106kh@applause.expensifail.com
App Component: Money Requests

Action Performed:

Precondition:

  • Workspace has per diem rates.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Go offline.
  4. Click + > Submit expense > Per diem.
  5. Select destination > Next.
  6. Select time > Next.
  7. Click Subrate.
  8. Select a subrate.
  9. Enter quantity that is larger than 1.
  10. Submit the expense.
  11. Go to transaction thread.
  12. Note that the description field shows "20x Part Day @ €0.34".
  13. Go online.

Expected Result:

The description field content should remain consistent when creating per diem expense offline and after returning online.

Actual Result:

In offline mode, the description field shows "20x Part Day @ €0.34".
After returning online, it shows "Part Day @ €0.34 x 20".

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

@vincdargento vincdargento added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlockerCash This issue or pull request should block deployment labels Jan 17, 2025
Copy link

melvin-bot bot commented Jan 17, 2025

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

Copy link

melvin-bot bot commented Jan 17, 2025

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

Copy link

melvin-bot bot commented Jan 17, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jan 17, 2025
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.

@vincdargento
Copy link
Author

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

@Gonals, Can you look into this since the doc has a different design than what you are sending through BE? https://docs.google.com/document/d/1c6WDOJlhvODD0mRKaCHfQk_HRNmq5K7hSDHLu06Pbq8/edit?tab=t.0#bookmark=id.no4w5esni3zt

@neil-marcellini
Copy link
Contributor

NAB, per diem is behind a beta

@neil-marcellini neil-marcellini added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jan 17, 2025
@truph01
Copy link
Contributor

truph01 commented Jan 17, 2025

Proposal

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

  • In offline mode, the description field shows "20x Part Day @ €0.34".
  • After returning online, it shows "Part Day @ €0.34 x 20".

What is the root cause of that problem?

  • The optimistic format used in FE is different from the one used in BE:

return `${quantity}x ${rateComment} @ ${convertAmountToDisplayString(rate, currency)}`;

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

  • We should update it to:
        return `${rateComment} @ ${convertAmountToDisplayString(rate, currency)} x ${quantity}`;

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

  • We should add the test case for computeDefaultPerDiemExpenseComment to make sure this function have correct format.

What alternative solutions did you explore? (Optional)

@MitchExpensify MitchExpensify moved this to First Cohort - HIGH in [#whatsnext] #migrate Jan 18, 2025
@melvin-bot melvin-bot bot added the Overdue label Jan 20, 2025
@Gonals Gonals added the Internal Requires API changes or must be handled by Expensify staff label Jan 20, 2025
@melvin-bot melvin-bot bot removed the Overdue label Jan 20, 2025
@Gonals Gonals self-assigned this Jan 20, 2025
@Gonals
Copy link
Contributor

Gonals commented Jan 20, 2025

I'll take this as part of the Per Diem project. We likely have to change the description in the BE

@Gonals Gonals added the Reviewing Has a PR in review label Jan 20, 2025
@flaviadefaria
Copy link
Contributor

The current cohort do not have per diem as a feature so moving this to #expense

Copy link

melvin-bot bot commented Jan 28, 2025

@Gonals, @MitchExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Jan 30, 2025

@Gonals, @MitchExpensify Huh... This is 4 days overdue. Who can take care of this?

@Gonals
Copy link
Contributor

Gonals commented Jan 30, 2025

Already fixed

@Gonals Gonals closed this as completed Jan 30, 2025
@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in [#whatsnext] #expense Jan 30, 2025
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. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review
Projects
Status: Done
Development

No branches or pull requests

8 participants