-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix IOU with category can be created when admin disable the same category #35540
Conversation
There are two solutions proposed here by @dukenv0307 The main proposal is to reset the category if the selected category is disabled by admin. However, this disappearance of category can be confusing so he gave an alternative proposal which will show an error at the category field (if it was disabled in the meantime by the admin) and on the confirm button asking the user to change the category. Initially, I found the alternative proposal to be better here because it is clearer to the user but this being an edge case, I think the main proposal solution of resetting the category appears fine because it is simpler. This PR made these changes. Shall we proceed with these changes? |
@c3024 let's proceed with the current fix and then once we've been using this feature for a bit we can revisit if we need an explicit error message. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeresetCategoryAndroid.mp4Android: mWeb ChromeresetCategoryAndroidChrome.mp4iOS: NativeresetCategoryiOS.mp4iOS: mWeb SafariresetCategoryiOSSafari.mp4MacOS: Chrome / SafariresetCategoryChrome.mp4MacOS: DesktopresetCategoryDesktop.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@dukenv0307 you have a conflict :( |
@yuwenmemon please check again |
@dukenv0307 It also seems like this PR has been failing Performance Tests from the get-go - can you give a look at what's happening there? |
@dukenv0307, bump on this! |
Sorry for the late, I just merged main. Please check again |
🚀 Deployed to staging by https://github.com/Gonals in version: 1.4.42-0 🚀
|
if (!transaction.category) { | ||
return; | ||
} | ||
if (policyCategories[transaction.category] && !policyCategories[transaction.category].enabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. @situchan
Till the last commit of this PR
policyCategories
has a default value of {}
. Last main
merge changed it to null
. My review was not marked as stale. I could not check again after this commit before this PR got merged.
@dukenv0307 Could you raise a follow-up PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll raise a PR soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gonals @yuwenmemon, the crash was raised while the PR was in staging. It would have been ideal to create a deploy blocker to avoid this crash in production, especially now when we want a stable App version for the earnings call.
@c3024 @situchan, please raise a bug in #expensify-bugs when similar situations happen to have someone create a deploy blocker to avoid crashes into production in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting though, that Applause didn't report the crash as happening in production 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, you have to perform the reproduction steps real quick, so maybe it's not a big problem that it is in production, I think it's a rare case
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.4.42-5 🚀
|
Details
User can successfully create the IOU request when admin disable the same category
Fixed Issues
$ #35236
PROPOSAL: #35236 (comment)
Tests
Precondition:
User is an employee of Collect workspace on Old Dot which has categories set
Steps:
Offline tests
QA Steps
Precondition:
User is an employee of Collect workspace on Old Dot which has categories set
Steps:
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov