Skip to content

[HOLD for payment 2023-08-30] [$1000] Date is incorrect after editing money request #25441

Closed

Description

@luacmartins

cc @mountiny

Action Performed:

  1. Request money from another user
  2. Edit the money request date
  3. Verify that the selected date is incorrect after you tap Save

Expected Result:

Date is correct

Actual Result:

Date is incorrect

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number:
Reproducible in staging?:
Reproducible in production?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:

View all open jobs on GitHub

Screen.Recording.2023-08-17.at.5.05.01.PM.mov
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0154a57cff1cce910b
  • Upwork Job ID: 1692296957389250560
  • Last Price Increase: 2023-08-17
  • Automatic offers:
    • ShogunFire | Contributor | 26196211

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 17, 2023
  2. melvin-bot commented on Aug 17, 2023

    @melvin-bot

    Triggered auto assignment to @stephanieelliott (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. melvin-bot commented on Aug 17, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. self-assigned this
    on Aug 17, 2023
  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 17, 2023
  6. changed the title [-]Date is incorrect after editing money request[/-] [+][$1000] Date is incorrect after editing money request[/+] on Aug 17, 2023
  7. melvin-bot commented on Aug 17, 2023

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 17, 2023
  9. melvin-bot commented on Aug 17, 2023

    @melvin-bot

    Current assignee @stephanieelliott is eligible for the External assigner, not assigning anyone new.

  10. melvin-bot commented on Aug 17, 2023

    @melvin-bot

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

  11. ShogunFire commented on Aug 17, 2023

    @ShogunFire
    Contributor

    Proposal

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

    After editing a money request the date is incorrect

    What is the root cause of that problem?

    The root cause is that we are using TransactionUtils.getCreated to get the date and in that function we transform the string representing the date to a date object using new Date(). In javascript using new Date without the time can make the date component not use the local timezone (the timezone depends of the format) which can result in having a day off.

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

    We can use the method parseISO of date-fns to parse the date like this

    const createdDate = parseISO(created)
    
    if (createdDate) {
        return format(createdDate, CONST.DATE.FNS_FORMAT_STRING);
    }
    

    What alternative solutions did you explore? (Optional)

    We can add the time behind the date like this T00:00 to force it to use the local date

  12. mountiny commented on Aug 17, 2023

    @mountiny
    Contributor

    Wow nice @ShogunFire

    We can also pass the date with a format that avoid this weird behaviour, for example we can transform our string like this yyyy/mm/dd by replacing - with /

    I think this is interesting but just curios if there is anything else we can use without some special treatment. Is there some param we can pass to the Date() maybe? Or use something from the date-fns? cc @waterim

  13. 50 remaining items

  14. ShogunFire commented on Sep 12, 2023

    @ShogunFire
    Contributor

    Friendly bump @JmillsExpensify

  15. melvin-bot commented on Sep 18, 2023

    @melvin-bot

    @JmillsExpensify, @ShogunFire, @ArekChr, @mountiny Eep! 4 days overdue now. Issues have feelings too...

  16. sophiepintoraetz commented on Sep 20, 2023

    @sophiepintoraetz
    Contributor

    Confirming that the payment due to @ShogunFire (Pierre M) is $1500 here, correct? @JmillsExpensify @mountiny?

  17. melvin-bot commented on Sep 20, 2023

    @melvin-bot

    @JmillsExpensify, @ShogunFire, @ArekChr, @mountiny Still overdue 6 days?! Let's take care of this!

  18. mountiny commented on Sep 21, 2023

    @mountiny
    Contributor

    @sophiepintoraetz that is correct, thanks for helping

  19. sophiepintoraetz commented on Sep 21, 2023

    @sophiepintoraetz
    Contributor

    Payment done - is there anything else keeping this issue open?

  20. JmillsExpensify commented on Sep 21, 2023

    @JmillsExpensify
    Contributor

    Ah so sorry for the delay on this one. Don't hesitate to reach out to me via New Expensify DM.

  21. JmillsExpensify commented on Sep 21, 2023

    @JmillsExpensify
    Contributor

    In any case, @ArekChr I don't see a BZ checklist completed for this issue? Do you mind completing one, including whether a regression test is required? Thank you!

  22. ArekChr commented on Sep 21, 2023

    @ArekChr
    Contributor
    • Link to the PR: No bug identified.
    • Link to comment: n/a
    • Link to discussion: n/a
    • Determine if we should create a regression test for this bug: I don’t think we need to add a regression test here.
  23. JmillsExpensify commented on Sep 25, 2023

    @JmillsExpensify
    Contributor

    Great thank you! All done here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions