-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Due for payment 2025-05-20] [$250] Error in archived task "Set up categories" when disabling category in another workspace #61006
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
Comments
Triggered auto assignment to @kadiealexander ( |
Triggered auto assignment to @robertjchen ( |
💬 A slack conversation has been started in #expensify-open-source |
👋 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:
|
🚨 Edited by proposal-police: This proposal was edited at 2025-04-29 04:33:46 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Error in archived task "Set up categories" when disabling category in another workspace What is the root cause of that problem?This happen when we try to complete an onboarding task when we disable a category but we actually not checking if the report has been archived/ onboarding workspace has been deleted here Lines 1281 to 1283 in bd0f3f2
What changes do you think we should make in order to solve the problem?We should add if (!ReportUtils.isArchivedReportWithID(taskReport?.reportID) && (taskReport.stateNum !== CONST.REPORT.STATE_NUM.APPROVED || taskReport.statusNum !== CONST.REPORT.STATUS_NUM.APPROVED)) { What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional)We can check if the category belong to same workspace/ onboarding workspace, before calling here Lines 1282 to 1284 in bd0f3f2
|
Job added to Upwork: https://www.upwork.com/jobs/~021917138863048883245 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
function getFinishOnboardingTaskOnyxData(taskName: keyof OnyxTypes.IntroSelected): OnyxData {
const taskReportID = introSelected?.[taskName];
const taskReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${taskReportID}`];
if (taskReportID && canActionTask(taskReport, currentUserAccountID)) { // Consider passing 3rd, 4th params.
if (taskReport) {
if (taskReport.stateNum !== CONST.REPORT.STATE_NUM.APPROVED || taskReport.statusNum !== CONST.REPORT.STATUS_NUM.APPROVED) {
return completeTask(taskReport);
}
}
}
return {};
} What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional) |
I'll review in the morning |
Thanks for the proposals, everyone. 🎀 👀 🎀 C+ reviewed |
@truph01 My 2 cents here: Both proposals have the correct root cause, and the solutions are quite similar.
It was always a hard decision for me to select between the correct fix and the correct fix that has been generally used inside the App. |
Thanks @hungvu193. The 2nd point I think we should consider is that my proposal has the automated tests, which can make sure a similar bug doesn't appear in the future.
Anyway, @robertjchen All yours! |
@robertjchen, @hungvu193, @kadiealexander Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
👀 |
@robertjchen Let me know if you need any explanation on #61006 (comment), thank you |
Thanks for the discussions here! Having evaluated both proposals, I agree that it's pretty close one @hungvu193 . However, I think I'll come down on the side of @truph01 given that we'll be adding a test 🙏 |
📣 @truph01 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@robertjchen I think we should fix the actual root cause that was pretty simple (ignore the completeTask when the report has been archived) the chosen proposal suggest to check I'll add the test in my solution, could you please take a look again? |
Thanks @robertjchen. I am working on it and will open PR soon |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.44-8 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 2025-05-20. 🎊 For reference, here are some details about the assignees on this issue:
|
@hungvu193 @kadiealexander @hungvu193 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] |
Payments needed:
@hungvu193 please complete the checklist! |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalTest:
Do we agree 👍 or 👎 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.1.33-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Other
Action Performed:
Expected Result:
The task report "Set up categories" should not be marked when the original workspace is deleted and category in another workspace is disabled.
Actual Result:
The task report "Set up categories" is marked when the original workspace is deleted and category in another workspace is disabled.
As a result, the task report shows the error "You don't have permission to take the requested action" because the task report is archived.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6815851_1745890407417.20250429_092511.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @kadiealexanderThe text was updated successfully, but these errors were encountered: