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] Android - Track expense - Error displayed when track distance expense in self DM #45605

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 17, 2024 · 18 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Not a priority Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 17, 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: 9.0.7.4
Reproducible in staging?: Y
Reproducible in production?: Y
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 whn executing PR #43819

Action Performed:

  1. Open the app and log in
  2. Open the self Dm
  3. Tap + > Track expense > Distance
  4. Enter two viewpoints and create an expense
  5. Open the created expense

Expected Result:

There is no error after creating an expense, and the distance field shows the vlaue

Actual Result:

The distance field shows pending, and after some the error "Unexpected error submitting expense. Please try again later" is displayed

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

Bug6544115_1721144599207.video_2024-07-16_11-43-10.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a00f0f0391819080
  • Upwork Job ID: 1814324563707246828
  • Last Price Increase: 2024-08-09
Issue OwnerCurrent Issue Owner: @rushatgabhane
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

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

@abekkala abekkala added the External Added to denote the issue can be worked on by a contributor label Jul 19, 2024
Copy link

melvin-bot bot commented Jul 19, 2024

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

@melvin-bot melvin-bot bot changed the title Android - Track expense - Error displayed when track distance expense in self DM [$250] Android - Track expense - Error displayed when track distance expense in self DM Jul 19, 2024
@melvin-bot melvin-bot bot added Overdue Help Wanted Apply this label when an issue is open to proposals by contributors labels Jul 19, 2024
Copy link

melvin-bot bot commented Jul 19, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Jul 19, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

@abekkala, @rushatgabhane Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Jul 22, 2024
@kabeer95
Copy link

Proposal

Problem Statement Please re-state the problem that we are trying to solve in this issue:

When a user tries to track distance expense in self DM, an error is displayed.

Root Cause What is the root cause of that problem:

The root cause of this problem is that the code is not properly handling the submission of distance expenses in Direct Messages.

Proposed Solution

What changes do you think we should make in order to solve the problem: To solve this problem, I propose modifying the ExpenseList.js file to ensure that the map function is only called if expenses is defined and not undefined. Additionally, I suggest modifying the App.js file to properly handle the response from the server and add error handling.

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

In the ExpenseList.js file, replace the following line:

{expenses.map((expense, index) => (

with:

{expenses && expenses.map((expense, index) => (

In the App.js file, ensure that the fetchExpenses function is properly handling the response from the server. This may involve adding error handling or modifying the response parsing logic.

Solution Code

Here is the code that can solve the problem:

In the ExpenseList.js file:

{expenses && expenses.map((expense, index) => (
  <ExpenseItem
    key={index}
    expense={expense}
    onPress={() => selectExpense(expense)}
  />
))}

In the App.js file:

const fetchExpenses = async () => {
  try {
    const response = await fetch(
      `https://expensify-api.herokuapp.com/api/expenses`
    );
    const data = await response.json();
    setExpenses(data);
  } catch (error) {
    console.error(error);
  }
};

@rushatgabhane
Copy link
Member

The root cause of this problem is that the code is not properly handling the submission of distance

@kabeer95 sorry I do not understand the root cause. Could you please elaborate it?

@melvin-bot melvin-bot bot removed the Overdue label Jul 23, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

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

@abekkala
Copy link
Contributor

@kabeer95 can you address the question above from @rushatgabhane and elaborate on your comment

Copy link

melvin-bot bot commented Jul 30, 2024

@abekkala, @rushatgabhane Still overdue 6 days?! Let's take care of this!

Copy link

melvin-bot bot commented Jul 31, 2024

@abekkala @rushatgabhane 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!

Copy link

melvin-bot bot commented Aug 1, 2024

@abekkala, @rushatgabhane 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

Copy link

melvin-bot bot commented Aug 2, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Aug 5, 2024

@abekkala, @rushatgabhane 12 days overdue now... This issue's end is nigh!

@abekkala
Copy link
Contributor

abekkala commented Aug 7, 2024

let's get this one retested

@abekkala abekkala added the retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause label Aug 7, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Aug 8, 2024
Copy link

melvin-bot bot commented Aug 8, 2024

This issue has not been updated in over 14 days. @abekkala, @rushatgabhane eroding to Weekly issue.

@melvin-bot melvin-bot bot removed the Overdue label Aug 8, 2024
Copy link

melvin-bot bot commented Aug 9, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@abekkala abekkala added Not a priority and removed retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause labels Aug 12, 2024
@abekkala
Copy link
Contributor

this is for VSB which is on hold - closing
not a priority

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 Help Wanted Apply this label when an issue is open to proposals by contributors Not a priority Weekly KSv2
Projects
None yet
Development

No branches or pull requests

4 participants