You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-04-05] [$500] Category - Recent and All sections appear when selected category is invalid with <8 categories #37766
[Employee] Create two manual requests, with Merchant A and Merchant B
[Admin] On Old Dot. disable Merchant A so that now there is less than 8 categories
[Employee] Go to the details page of request that has Merchant A
[Employee] Click Category
Expected Result:
Since there is now less than 8 categories, the category list will not show search field, Recent and All sections
Actual Result:
Although there is less than 8 categories, the category list still shows Recent and All sections
When employee selects another category and reopens the list, the sections are gone
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
👋 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:
Identify the pull request that introduced this issue and revert it.
@luacmartins FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
What changes do you think we should make in order to solve the problem?
We should subtract number of disabled selected option from numberOfVisibleCategories to get the correct value.
constselectedOptionNames=selectedOptions.map((selectedOption)=>selectedOption.name);constdisabledSelectedOptionLength=selectedOptions.filter((selectedOption)=>!selectedOption.enabled).length;constenabledAndSelectedCategories=[...selectedOptions, ...sortedCategories.filter((category)=>category.enabled&&!selectedOptionNames.includes(category.name))];constnumberOfVisibleCategories=enabledAndSelectedCategories.length-disabledSelectedOptionLength;if(numberOfVisibleCategories<CONST.CATEGORY_LIST_THRESHOLD){categorySections.push({// "All" section when items amount less than the thresholdtitle: '',shouldShow: false,
indexOffset,data: getCategoryOptionTree(enabledAndSelectedCategories),});returncategorySections;}
We might need to do the same for Tags or other similar fields.
Result
Alternative
We can use numberOfCategories and we can remove numberOfVisibleCategories as it will be redundant.
@johncschuster, the summary says I have been paid, but I haven't received the payment yet. Just pointing this out in case there is any confusion. I just accepted the new offer.
Sorry I missed your ping, @Krishna2323! The note above wasn't meant to say you were already paid – it was meant to mean that the method by which you would be paid is through Upwork. I've just issued payment now! 🎉
Activity
github-actions commentedon Mar 5, 2024
👋 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:
melvin-bot commentedon Mar 5, 2024
Triggered auto assignment to @luacmartins (
Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.lanitochka17 commentedon Mar 5, 2024
We think that this bug might be related to #wave6
CC @greg-schroeder
lanitochka17 commentedon Mar 5, 2024
@luacmartins FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Krishna2323 commentedon Mar 5, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Category - Recent and All sections appear when selected category is invalid with <8 categories
What is the root cause of that problem?
We include
selectedOptionsas enabled option and based on that we check fornumberOfVisibleCategories < CONST.CATEGORY_LIST_THRESHOLD.App/src/libs/OptionsListUtils.ts
Lines 998 to 1009 in 5199604
What changes do you think we should make in order to solve the problem?
We should subtract number of disabled selected option from
numberOfVisibleCategoriesto get the correct value.We might need to do the same for Tags or other similar fields.
Result
Alternative
We can use
numberOfCategoriesand we can removenumberOfVisibleCategoriesas it will be redundant.App/src/libs/OptionsListUtils.ts
Line 963 in 2faffcd
luacmartins commentedon Mar 5, 2024
I'm unable to reproduce this issue on staging. See video below:
Screen.Recording.2024-03-05.at.1.58.39.PM.mov
54 remaining items
Krishna2323 commentedon Apr 6, 2024
@johncschuster, the summary says I have been paid, but I haven't received the payment yet. Just pointing this out in case there is any confusion. I just accepted the new offer.
Krishna2323 commentedon Apr 9, 2024
@johncschuster, bump for payments 🙇🏻
melvin-bot commentedon Apr 12, 2024
@johncschuster, @luacmartins, @allroundexperts, @Krishna2323 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
johncschuster commentedon Apr 12, 2024
Sorry I missed your ping, @Krishna2323! The note above wasn't meant to say you were already paid – it was meant to mean that the method by which you would be paid is through Upwork. I've just issued payment now! 🎉
johncschuster commentedon Apr 12, 2024
@allroundexperts can you complete the BZ Checklist above? Thank you!
allroundexperts commentedon Apr 15, 2024
Checklist
JmillsExpensify commentedon May 3, 2024
$500 approved for @allroundexperts