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

Unable to Delete receipt after "Replace" is used by Admin #52345

Open
OfstadC opened this issue Nov 11, 2024 · 31 comments
Open

Unable to Delete receipt after "Replace" is used by Admin #52345

OfstadC opened this issue Nov 11, 2024 · 31 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Hot Pick Ready for an engineer to pick up and run with Internal Requires API changes or must be handled by Expensify staff Weekly KSv2

Comments

@OfstadC
Copy link
Contributor

OfstadC commented Nov 11, 2024

Original GH: #50113 (comment)

Action Performed:

  1. From an employee account - navigate to the workspace chat and click + > Submit Expense > Scan Receipt > Complete submit flow
  2. Login as admin
  3. Click on the receipt thumbnail
  4. Click on "Replace" > Choose another receipt or take a photo of it > Upload
  5. "Delete" > Confirm > Notice that an error is thrown
  6. An error is shown: 'Unexpected...'

Expected Result:

We should to two things here:

  • Enable replace functionality on backend so that admins and managers can replace receipts -- Here's the logic that will need to be updated:
  • Remove delete button for managers/admins, but keep the delete button for submitters -- this can be done as part of the front-end issue

Screenshots/Videos

I didn't grab a new video when I reproduced this afternoon - but will grab one first thing tomorrow morning

jsonCode
:
405
message
:
"405 Cannot detach receipt from unowned transaction"
onyxData
:
[]
requestID
:
"8e109b54d92daccc-MSP"

Logs

Add any screenshot/video evidence
Issue OwnerCurrent Issue Owner: @Julesssss
@OfstadC OfstadC added Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Hot Pick Ready for an engineer to pick up and run with AutoAssignerNewDotQuality Used to assign quality issues to engineers labels Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

Triggered auto assignment to @Julesssss (AutoAssignerNewDotQuality)

@tgolen
Copy link
Contributor

tgolen commented Nov 11, 2024

FYI there was also this very small thread in Slack where we were talking about the expected behavior. So, if we are still questioning what the functionality should be, please respond in that thread.

@Julesssss
Copy link
Contributor

The steps are correct. As discussed we want to allow admins to detach receipts in NewDot. Though I have asked here to clarify, as we may only want to support the replace case.

Here's the logic that will need to be updated:

// Managers and admins cannot detach receipts unless they own the expense,
// but they can merge transactions within the same report.
if (!receiptID && !isManagerOrAdminMerging && (isManagerOrAdminAttaching && !canUserAttach)) {
    STHROW("405 Cannot detach receipt from unowned transaction");
}

@Julesssss Julesssss removed the Daily KSv2 label Nov 12, 2024
@Julesssss
Copy link
Contributor

Expected behaviour verified, we should to two things here:

I have updated the issue description

@Julesssss Julesssss removed their assignment Nov 12, 2024
@garrettmknight garrettmknight added the Bug Something is broken. Auto assigns a BugZero manager. label Nov 14, 2024
Copy link

melvin-bot bot commented Nov 14, 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.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 14, 2024
@garrettmknight
Copy link
Contributor

@Julesssss if you're gonna unassign can you make sure a BZ member is on it in the future?

@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Nov 14, 2024
@Julesssss
Copy link
Contributor

Ah sure. I thought that was only necessary for external issues? We already have an external issue #50113 for the front-end changes. LMK if I'm mistaken though

@joekaufmanexpensify
Copy link
Contributor

Yeah, I am also curious about this. If there is nothing contributor-related to do here because of the separate FE issue, I feel like a BZ might not be needed. But also not sure if there is a defined process for this. Curious to hear what @garrettmknight thinks as well

@garrettmknight
Copy link
Contributor

That's fair - I missed the external issue. Equally, this is kind of a weird pattern where we have an external issue on hold + an unassigned internal issue that melvin will probably continue to degrade until it closes. Maybe a good follow up there - why unassign this instead of implementing the fix you identified?

Screenshot 2024-11-15 at 7 10 19 PM

@melvin-bot melvin-bot bot added the Overdue label Nov 18, 2024
Copy link

melvin-bot bot commented Nov 18, 2024

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

@Julesssss
Copy link
Contributor

I unassigned because unless I am mistaken; A) Engineers must triage but not necessarily implement auto-assigned engineering issues (including quality), and B) this is lower priority than other k2 issues, which include quality and migrate issues that will probably keep me busy until the end of the year.

Agree with this being a weird case, Matt Allen and I discussed this a bit here#49162 (comment).

@joekaufmanexpensify
Copy link
Contributor

I also am a bit confused why we wouldn't just manage the backend portion of this bug in the original issue? This is also just an app issue. Seems more efficient to handle both in one issue (if they're both app issues), rather than work on two halves of the same bug separately.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 18, 2024
@melvin-bot melvin-bot bot added the Overdue label Dec 4, 2024
@Julesssss
Copy link
Contributor

I'm working on external/internal issues that are going to take a while. Just noting for future reference that this is unlikely to be picked up until 2025

@melvin-bot melvin-bot bot removed the Overdue label Dec 4, 2024
@twisterdotcom twisterdotcom removed the Hot Pick Ready for an engineer to pick up and run with label Dec 6, 2024
@twisterdotcom
Copy link
Contributor

twisterdotcom commented Dec 6, 2024

I am removing hot pick from any issues with an internal engineer assigned so other engineers can know it's unavailable/taken.

@melvin-bot melvin-bot bot added the Overdue label Dec 9, 2024
Copy link

melvin-bot bot commented Dec 10, 2024

@Julesssss, @joekaufmanexpensify Eep! 4 days overdue now. Issues have feelings too...

@Julesssss
Copy link
Contributor

Same as above. I might share this with Garrett to list as an #expense issue that is looking for a volunteer

@melvin-bot melvin-bot bot removed the Overdue label Dec 11, 2024
@Julesssss
Copy link
Contributor

I shared in the #expense channel here.

@joekaufmanexpensify
Copy link
Contributor

TY!

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

melvin-bot bot commented Dec 17, 2024

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

@Julesssss
Copy link
Contributor

Julesssss commented Dec 17, 2024

Awaiting volunteers. @garrettmknight if you don't mind, could you please highlight this backend issue in your next #expense roundup? We just need someone with no assigned issue to implement this new logic.

we want to allow admins to detach receipts in NewDot

@melvin-bot melvin-bot bot removed the Overdue label Dec 17, 2024
@garrettmknight garrettmknight added the Hot Pick Ready for an engineer to pick up and run with label Dec 17, 2024
@melvin-bot melvin-bot bot added the Overdue label Dec 20, 2024
@joekaufmanexpensify
Copy link
Contributor

Moving this one to weekly for now as I am OOO after today through new years and I see you are as well!

@joekaufmanexpensify joekaufmanexpensify added Weekly KSv2 and removed Daily KSv2 labels Dec 20, 2024
@melvin-bot melvin-bot bot removed the Overdue label Dec 20, 2024
@melvin-bot melvin-bot bot added the Overdue label Dec 30, 2024
@joekaufmanexpensify
Copy link
Contributor

OOO this week, we will circle back next week

@Julesssss
Copy link
Contributor

We're seeking a volunteer for this one internally

@melvin-bot melvin-bot bot removed the Overdue label Jan 3, 2025
@melvin-bot melvin-bot bot added the Overdue label Jan 13, 2025
@Julesssss
Copy link
Contributor

No volunteer yet. Will ask again next week. I have higher priority issues to work on currently.

@garrettmknight
Copy link
Contributor

@Julesssss dropping you off in case anyone is looking for Hot Picks and thinks you're handling.

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. Hot Pick Ready for an engineer to pick up and run with Internal Requires API changes or must be handled by Expensify staff Weekly KSv2
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

6 participants