Skip to content

[HOLD for payment 2024-11-13] [$250] Workflows - Edit approval workflow becomes blank after editing it offline and returning online #51468

Closed

Description

@izarutskaya

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.54-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): applausetester+kh1610015@applause.expensifail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Workflows.
  3. Enable Add approvals.
  4. Go offline.
  5. Click on the existing approval workflow.
  6. Click Approval.
  7. Select another member and click Save.
  8. Click Save again.
  9. Click on the same workflow.
  10. Go online.

Expected Result:

Edit approval workflow will not become blank after returning online.

Actual Result:

Edit approval workflow becomes blank after editing it offline and returning online.

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Bug6645399_1729851090815.20241025_180844.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021851096096588176267
  • Upwork Job ID: 1851096096588176267
  • Last Price Increase: 2024-10-29
  • Automatic offers:
    • FitseTLT | Contributor | 104666575
Issue OwnerCurrent Issue Owner: @VictoriaExpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 25, 2024
  2. melvin-bot commented on Oct 25, 2024

    @melvin-bot

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

  3. izarutskaya commented on Oct 25, 2024

    @izarutskaya
    Author

    We think this issue might be related to the #wave-control

  4. FitseTLT commented on Oct 25, 2024

    @FitseTLT
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-10-25 13:34:27 UTC.

    Proposal

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

    Workflows - Edit approval workflow becomes blank after editing it offline and returning online

    What is the root cause of that problem?

    We are re-setting APPROVAL_WORKFLOW on success data here

    const successData: OnyxUpdate[] = [
    {
    onyxMethod: Onyx.METHOD.SET,
    key: ONYXKEYS.APPROVAL_WORKFLOW,
    value: null,

    so when we go online and the request completes successfully it deletes approval workflow so we see blank page as there is nothing to show

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

    APPROVAL_WORKFLOW is where we save the draft approval workflow until we save the workflow so no need to reset it in success data it should be reset in optimistic data immediately so that it would be used by the next approval modification
    We should remove the successData and failureData for APPROVAL_WORKFLOW and only reset it in optimistic data here

    key: ONYXKEYS.APPROVAL_WORKFLOW,
    value: {
    isLoading: true,

                value: null,
    
    

    We should do the same in other places like here
    here
    isLoading is unnecessary and we will remove it from APPROVAL_WORKFLOW

    What alternative solutions did you explore? (Optional)

  5. melvin-bot commented on Oct 28, 2024

    @melvin-bot

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

  6. VictoriaExpensify commented on Oct 29, 2024

    @VictoriaExpensify
    Contributor

    Oh yes, this is a problem and we should fix it

  7. changed the title [-]Workflows - Edit approval workflow becomes blank after editing it offline and returning online[/-] [+][$250] Workflows - Edit approval workflow becomes blank after editing it offline and returning online[/+] on Oct 29, 2024
  8. melvin-bot commented on Oct 29, 2024

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 29, 2024
  10. 20 remaining items

  11. changed the title [-][$250] Workflows - Edit approval workflow becomes blank after editing it offline and returning online[/-] [+][HOLD for payment 2024-11-13] [$250] Workflows - Edit approval workflow becomes blank after editing it offline and returning online[/+] on Nov 6, 2024
  12. melvin-bot commented on Nov 6, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Nov 6, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.57-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-11-13. 🎊

    For reference, here are some details about the assignees on this issue:

  14. melvin-bot commented on Nov 6, 2024

    @melvin-bot

    @s77rt @VictoriaExpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  15. s77rt commented on Nov 6, 2024

    @s77rt
    Member

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production
    • 2b. Reported on staging (deploy blocker)
    • 2c. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: [No QA][CRITICAL] [Advanced Approval Workflows] Implement Onyx Actions (API calls & Onyx writes) #46189 (comment)

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: n/a

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    • Workspace with Workflow feature enabled

    Test:

    1. Go to Workspace > Workflows
    2. Enable "Add approvals"
    3. Go offline
    4. Click on the default approval workflow
    5. Change the approver (then click Save twice till the modal is dismissed)
    6. Click on the default approval workflow
    7. Go online
    8. Verify that the page remain unchanged and not blank

    Do we agree 👍 or 👎

  16. VictoriaExpensify commented on Nov 13, 2024

    @VictoriaExpensify
    Contributor

    Hey @s77rt - I think this sounds like it could do with a regression test, do you agree? If so, can you please add it to the template above?

  17. s77rt commented on Nov 13, 2024

    @s77rt
    Member
  18. VictoriaExpensify commented on Nov 14, 2024

    @VictoriaExpensify
    Contributor
  19. VictoriaExpensify commented on Nov 14, 2024

    @VictoriaExpensify
    Contributor

    Payment summary:
    Contributor: @FitseTLT paid $250 via Upwork
    Contributor+: @s77rt owed $250 via New Expensify

  20. JmillsExpensify commented on Nov 14, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @s77rt

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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions