Skip to content

fix: require attendees based on category selection (follow-up)#79741

Merged
JS00001 merged 15 commits intoExpensify:mainfrom
ikevin127:ikevin127-requireAttendeesFollowUp
Jan 27, 2026
Merged

fix: require attendees based on category selection (follow-up)#79741
JS00001 merged 15 commits intoExpensify:mainfrom
ikevin127:ikevin127-requireAttendeesFollowUp

Conversation

@ikevin127
Copy link
Contributor

@ikevin127 ikevin127 commented Jan 16, 2026

Explanation of Change

Follow-up from rework PR #79050 addressing regressions.

Fixed Issues

$ #76155
PROPOSAL: #76155 (comment)

Tests

1. Invoice - "Multiple attendees required for this category" appears on invoice row #79707

Preconditions:

  • Rules are enabled.
  • Enable Attendee tracking in Rules.
  • Make Advertising category require attendees in category settings.
  • Invoice is enabled.
  1. Open FAB > Send invoice.
  2. Enter amount > Next.
  3. Select a user > Next.
  4. On confirm page, select Advertising category.
  5. Send the invoice.
  6. Go to Reports > Expenses.
  7. Click Type dropdown.
  8. Select Invoice and click Apply.
  9. Verify that "Multiple attendees required for this category" will not appear on invoice row.

2. Expense - Invited member cannot see Attendee field #79710

Preconditions:

  • Rules are enabled.
  • Enable Attendee tracking in Rules.
  1. Go to workspace chat.
  2. Create two expenses.
  3. Open the expense report.
  4. Mention User B and send it to the report.
  5. Click Invite to chat only.
  6. As User B, open the report.
  7. Verify that User B can see Attendees field.

Note

Note for QA

If step 7 is failing, open the browser console and you should see a Debug Logs log, copy the object from the log and paste it in the PR to help PR author with debugging.

3. IOU - Stuck with "Category no longer valid" on confirm page after changing to a valid category #79902

Precondition:

  • Have a workspace
  1. Go to self DM.
  2. Create an expense with Advertising category in selfDM.
  3. Go to workspace settings > Categories.
  4. Delete Advertising category.
  5. Go back to selfDM.
  6. Click Submit it to someone.
  7. Select the workspace with deleted Advertising category.
  8. On confirm page, enter merchant.
  9. Click Create expense (notice violation appears).
  10. Click Category.
  11. Change to a valid / existing category.
  12. On confirm page, click Create expense.
  13. Verify that violation is cleared and expense can be submitted to the workspace chat.
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Test 1

web-1.mov

Test 2

web-2.mov

@ikevin127
Copy link
Contributor Author

Here's a recap of the 3 regressions found:

  • The first issue was addressed in this PR, besides other small fixes not related to regressions.
  • The second one I wasn't able to reproduce the second one, I always see the field but sometimes on older accounts the field is empty even though it should show the owner - I thing this is BE related because:
    • the transaction.comment.attendees is empty for User B because the backend didn't sync that data to non-members (noting that when we Invite for chat only this user is not added to the workspace as a member)
empty-attendees
  • The 3rd issue I debunked in the issue itself, from what OP shows this is expected, see details here

@JS00001 Could you please trigger a web-only adhoc build on this PR and please ask QA to test it ? I added tests for the first 2 issues + console logs in case QA can still reproduce the second one 🙌

@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 84.03% <100.00%> (+0.13%) ⬆️
src/components/TransactionItemRow/index.tsx 86.79% <100.00%> (ø)
src/hooks/useTransactionViolations.ts 100.00% <100.00%> (ø)
src/libs/TransactionUtils/index.ts 73.17% <100.00%> (+0.09%) ⬆️
src/libs/Violations/ViolationsUtils.ts 71.95% <100.00%> (+1.87%) ⬆️
...ages/workspace/categories/CategorySettingsPage.tsx 0.00% <ø> (ø)
src/components/MoneyRequestConfirmationList.tsx 57.70% <50.00%> (+0.22%) ⬆️
...ionListWithSections/Search/TransactionListItem.tsx 0.00% <0.00%> (ø)
...orkspace/categories/CategoryRequiredFieldsPage.tsx 0.00% <0.00%> (ø)
src/libs/AttendeeUtils.ts 38.46% <25.00%> (+27.93%) ⬆️
... and 1 more
... and 22 files with indirect coverage changes

@Expensify Expensify deleted a comment from github-actions bot Jan 16, 2026
@github-actions
Copy link
Contributor

🚧 @JS00001 has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions
Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #79741.

Android 🤖 iOS 🍎
⏩ SKIPPED ⏩ ⏩ SKIPPED ⏩
The build for Android was skipped The build for iOS was skipped
Web 🕸️
https://79741.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

@ikevin127
Copy link
Contributor Author

@IuliiaHerets Could you please help test this PRs web adhoc build using the test in PR Test section ? Please share the debug logs from console for Test 2 in case it fails for you at step 7 🙌

@IuliiaHerets
Copy link

@ikevin127 sorry for delay. Can you please clarify, you want us using the last build retest these steps? Which platforms do you want us to test?
image

@ikevin127 ikevin127 closed this Jan 20, 2026
@ikevin127 ikevin127 reopened this Jan 21, 2026
@ikevin127
Copy link
Contributor Author

ikevin127 commented Jan 21, 2026

@ikevin127 sorry for delay. Can you please clarify, you want us using the #79741 (comment) retest these steps? Which platforms do you want us to test?

@IuliiaHerets Yes please, the adhoc build is web only so web is enough, but both tests should be verified 🙌

1. Invoice - "Multiple attendees required for this category" appears on invoice row #79707
2. Expense - Invited member cannot see Attendee field #79710

@IuliiaHerets
Copy link

@ikevin127, both issues are not reproduced using the ad-hoc build

#79707

20260121_204500.mp4

#79710

20260121_204714.mp4

@ikevin127
Copy link
Contributor Author

@JS00001 We got ☝️ confirmation from QA that this PR fixes the 2 issues we had most recently (adhoc build was created before I added dev/staging lock so it's valid) - we should be good to go here, I'll open the PR today ✅

@ikevin127 ikevin127 marked this pull request as ready for review January 22, 2026 01:02
@ikevin127 ikevin127 requested review from a team as code owners January 22, 2026 01:02
@melvin-bot melvin-bot bot requested review from a team and JS00001 and removed request for a team January 22, 2026 01:02
@ikevin127
Copy link
Contributor Author

@jayeshmangwani Fixed the issue mentioned, here's the proposal if interested in RCA / solution and below are the steps (added to PR description as well) / proof to verify that the issue was resolved.

🟢 Ready for final review!

3. IOU - Stuck with "Category no longer valid" on confirm page after changing to a valid category #79902

Precondition:

  • Have a workspace
  1. Go to self DM.
  2. Create an expense with Advertising category in selfDM.
  3. Go to workspace settings > Categories.
  4. Delete Advertising category.
  5. Go back to selfDM.
  6. Click Submit it to someone.
  7. Select the workspace with deleted Advertising category.
  8. On confirm page, enter merchant.
  9. Click Create expense (notice violation appears).
  10. Click Category.
  11. Change to a valid / existing category.
  12. On confirm page, click Create expense.
  13. Verify that violation is cleared and expense can be submitted to the workspace chat.
Screen.Recording.2026-01-23.at.16.46.32.mov

@ikevin127 ikevin127 changed the title [WIP] fix: require attendees based on category selection (follow-up) fix: require attendees based on category selection (follow-up) Jan 24, 2026
@jayeshmangwani
Copy link
Contributor

thanks for fixing that bug , i will go through the PR today

@JS00001
Copy link
Contributor

JS00001 commented Jan 26, 2026

@jayeshmangwani lmk when this one is ready for final review

Copy link
Contributor

@jayeshmangwani jayeshmangwani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@melvin-bot melvin-bot bot requested a review from JS00001 January 26, 2026 18:52
@jayeshmangwani
Copy link
Contributor

@JS00001 PR works well and solves the three issues mentioned in the description. Looks good to me.

@ikevin127
Copy link
Contributor Author

@JS00001 Merged main to solve conflict in test file - good to merge! 🟢

@JS00001 JS00001 merged commit fabe910 into Expensify:main Jan 27, 2026
29 checks passed
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/JS00001 in version: 9.3.10-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@lanitochka17
Copy link

This PR is failing because of issue ##80683

The issue is reproducible in: IOS Android

@ikevin127
Copy link
Contributor Author

ikevin127 commented Jan 27, 2026

@lanitochka17 Was this tested on staging builds of the iOS / Android native app ? Asking because we added a specific dev / staging lock on the feature which could mean that the feature is disabled on builds that fall outside of that lock / or maybe there's an edge case for the Config?.ENVIRONMENT checks on native ?

@JS00001 If things work as expected on Web, the issue reported above might not be valid once the ☝️ lock is removed.

@IuliiaHerets
Copy link

@ikevin127 yes, PR was tested on stg as it was deployed to the current regression.

@lanitochka17
Copy link

@lanitochka17Проверялось ли это на тестовых сборках нативного приложения для iOS/Android? Спрашиваю, потому что мы добавили специальную блокировку для разработки/тестирования этой функции, что может означать, что функция отключена в сборках, выходящих за рамки этой блокировки, или, возможно, есть какой-то особый случай для проверок Config?.ENVIRONMENTна нативном устройстве?

@JS00001Если в веб-версии все работает как положено, описанная выше проблема может исчезнуть после снятия блокировки ☝️.

This was tested in the Android and iOS apps

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.10-6 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants