Skip to content

Move attendees from transaction to transaction's comment - #58120

Merged
francoisl merged 25 commits into
Expensify:mainfrom
allroundexperts:fix-57717
Apr 2, 2025
Merged

francoisl merged 25 commits into
Expensify:mainfrom
allroundexperts:fix-57717

Conversation

@allroundexperts

@allroundexperts allroundexperts commented Mar 10, 2025 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Move attendees from transaction to transaction's comment

Fixed Issues

$ #57717
PROPOSAL: N/A

Tests

  1. Open the FAB menu and click on create expense.
  2. Select manual expense creation and enter an amount.
  3. On the confirmation screen, click on Attendees section and add some attendee users.
  4. Submit the expense and go to expense details page.

Verify that the attendees show up on the expense details page.

  1. Click on the Attendees section and add more attendees.

Verify that the attendees get added successfully and a message appears in the expense details page showing the previous and new attendees.

  • Verify that no errors appear in the JS console

Offline tests

Same as tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

Same as tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible 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 checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (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
    • 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 verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • 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
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
      • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • 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 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.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
Screen.Recording.2025-03-19.at.12.53.16.AM.mov
Screen.Recording.2025-03-28.at.4.26.19.AM.mov
iOS: Native
Screen.Recording.2025-03-19.at.1.16.52.AM.mov
Screen.Recording.2025-03-28.at.4.24.29.AM.mov
iOS: mWeb Safari
Screen.Recording.2025-03-19.at.1.08.35.AM.mov
Screen.Recording.2025-03-28.at.3.59.55.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2025-03-18.at.11.49.41.AM.mov
Screen.Recording.2025-03-28.at.3.52.14.AM.mov
MacOS: Desktop
Screen.Recording.2025-03-18.at.11.59.34.AM.mov
Screen.Recording.2025-03-28.at.3.56.33.AM.mov

Comment thread .gitmodules Resolved
@Julesssss

Copy link
Copy Markdown
Contributor

Hey @allroundexperts, I'm looking into the issues you mentioned here.

1) the call to UpdateMoneyRequestAttendees results in a response that sends old and new attendees in the originalMessage as object instead of string

Sending an array of objects for new and existing attendee sounds correct to me, is the client expecting this in string form?

Screenshot 2025-03-26 at 13 56 35

2) the backend is not sending the accountId and the login key for the transaction.comment.attendees

I believe our attendee object is expected, because that's exactly how we store attendees on the backend. Massaging them wouldn't be ideal. Would it be sufficient to return them in the personal details onyxData?

Attendees
Screenshot 2025-03-26 at 13 58 41

PersonalDetails
Screenshot 2025-03-26 at 13 59 10

@Julesssss

Julesssss commented Mar 26, 2025 •

Copy link
Copy Markdown
Contributor

it sounds like you're using the original message for the report comment, which might not be correct.

changed the attendees to [object Object],[object Object],[object Object] (previously user, admin2@chickens.com, admin3@chickens.com)

I think we should build a PureReportActionItem case for the attendees.

Or instead, lets ensure that buildMessageFragmentForValue is passed a string that has been built from that originalMessage object data. We'll then also want to set the attendee data optimistically as an object, to align with the backend.

@Julesssss

Julesssss commented Mar 27, 2025 •

Copy link
Copy Markdown
Contributor
  1. the call to UpdateMoneyRequestAttendees results in a response that sends old and new attendees in the originalMessage as object instead of string

I looked further into this issue and I think you can use this existing attendees function that converts the array of attendee objects to a string:

So we'd call that function here, passing in the message string we just converted.

@allroundexperts

Copy link
Copy Markdown
Contributor Author

@Julesssss Fixed the first error.

Screen.Recording.2025-03-28.at.2.01.23.AM.mov

@allroundexperts
allroundexperts marked this pull request as ready for review March 27, 2025 23:34
@allroundexperts
allroundexperts requested a review from a team as a code owner March 27, 2025 23:34
@melvin-bot
melvin-bot Bot requested review from fedirjh and removed request for a team March 27, 2025 23:34
@melvin-bot

melvin-bot Bot commented Mar 27, 2025

Copy link
Copy Markdown

@fedirjh Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@fedirjh fedirjh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left some code changes that should fix the problem with hidden items :

Full code diff

diff --git a/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx b/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx
index 3098fd1ef15..ebbe50c889b 100644
--- a/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx
+++ b/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx
@@ -11,6 +11,7 @@ import {useOptionsList} from '@components/OptionListContextProvider';
 import SelectionList from '@components/SelectionList';
 import InviteMemberListItem from '@components/SelectionList/InviteMemberListItem';
 import type {SectionListDataType} from '@components/SelectionList/types';
+import type {Option} from '@libs/OptionsListUtils';
 import useDebouncedState from '@hooks/useDebouncedState';
 import useLocalize from '@hooks/useLocalize';
 import useNetwork from '@hooks/useNetwork';
@@ -31,6 +32,7 @@ import {
     orderOptions,
 } from '@libs/OptionsListUtils';
 import {isPaidGroupPolicy as isPaidGroupPolicyFn} from '@libs/PolicyUtils';
+import {getPersonalDetailByEmail} from '@libs/PersonalDetailsUtils';
 import {searchInServer} from '@userActions/Report';
 import type {IOUAction, IOUType} from '@src/CONST';
 import CONST from '@src/CONST';
@@ -148,7 +150,7 @@ function MoneyRequestAttendeeSelector({attendees = [], onFinish, onAttendeesAdde
      * Returns the sections needed for the OptionsSelector
      */
     const [sections, header] = useMemo(() => {
-        const newSections: Array<SectionListDataType<Attendee>> = [];
+        const newSections: Array<SectionListDataType<Option>> = [];
         if (!areOptionsInitialized || !didScreenTransitionEnd) {
             return [newSections, ''];
         }
@@ -158,23 +160,28 @@ function MoneyRequestAttendeeSelector({attendees = [], onFinish, onAttendeesAdde
 
         const formatResults = formatSectionsFromSearchTerm(
             debouncedSearchTerm,
-            attendees.map((attendee) => ({...attendee, reportID: attendee.reportID ?? CONST.DEFAULT_NUMBER_ID.toString()})),
+            attendees.map((attendee) => ({
+                ...attendee, 
+                reportID: attendee.reportID ?? CONST.DEFAULT_NUMBER_ID.toString(),
+                selected: true,
+                ...getPersonalDetailByEmail(attendee.email)
+            })),
             chatOptions.recentReports,
             chatOptions.personalDetails,
             personalDetails,
             true,
         );
-        newSections.push(formatResults.section as SectionListDataType<Attendee>);
+        newSections.push(formatResults.section);
 
         newSections.push({
             title: translate('common.recents'),
-            data: fiveRecents as Attendee[],
+            data: fiveRecents,
             shouldShow: fiveRecents.length > 0,
         });
 
         newSections.push({
             title: translate('common.contacts'),
-            data: contactsWithRestOfRecents as Attendee[],
+            data: contactsWithRestOfRecents,
             shouldShow: contactsWithRestOfRecents.length > 0,
         });
 
@@ -187,7 +194,7 @@ function MoneyRequestAttendeeSelector({attendees = [], onFinish, onAttendeesAdde
                 data: [chatOptions.userToInvite].map((participant) => {
                     const isPolicyExpenseChat = participant?.isPolicyExpenseChat ?? false;
                     return isPolicyExpenseChat ? getPolicyExpenseReportOption(participant) : getParticipantsOption(participant, personalDetails);
-                }) as Attendee[],
+                }),
                 shouldShow: true,
             });
         }
@@ -214,12 +221,16 @@ function MoneyRequestAttendeeSelector({attendees = [], onFinish, onAttendeesAdde
     ]);
 
     const addAttendeeToSelection = useCallback(
-        (option: Attendee) => {
+        (option: Option) => {
             const isOptionSelected = (selectedOption: Attendee) => {
                 if (selectedOption.accountID && selectedOption.accountID === option?.accountID) {
                     return true;
                 }
 
+                if (selectedOption.email && selectedOption.email === option?.login) {
+                    return true;
+                }
+
                 return false;
             };
             const isOptionInList = attendees.some(isOptionSelected);
@@ -239,7 +250,7 @@ function MoneyRequestAttendeeSelector({attendees = [], onFinish, onAttendeesAdde
                         displayName: option.text ?? '',
                         selected: true,
                         searchText: option.searchText,
-                        avatarUrl: option.avatarUrl ?? '',
+                        avatarUrl: option.avatarUrl ?? option.icons?.[0]?.source?.toString() ?? '',
                         iouType,
                     },
                 ];
@@ -253,7 +264,7 @@ function MoneyRequestAttendeeSelector({attendees = [], onFinish, onAttendeesAdde
     const shouldShowErrorMessage = attendees.length < 1;
 
     const handleConfirmSelection = useCallback(
-        (_keyEvent?: GestureResponderEvent | KeyboardEvent, option?: Attendee) => {
+        (_keyEvent?: GestureResponderEvent | KeyboardEvent, option?: Option) => {
             if (shouldShowErrorMessage || (!attendees.length && !option)) {
                 return;
             }

@allroundexperts

Copy link
Copy Markdown
Contributor Author

If you add someone as an attendee who's not a valid email (i.e. just a name, which is a valid attendee), we use the fallback avatar, and in the UpdateMoneyRequestAttendees API call, we end up passing a stringified version of the SvgFallbackAvatar function. Can we pass an empty string instead? This might be worth being double-checked in the backend though, I'll look into that.

This is handled @francoisl

@fedirjh fedirjh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is a little bug with paid workspace, when you select the current user and you try to edit later, the current user will be displayed twice in the list :

Screenshot 2025-03-31 at 10 59 01 PM

This code should fix it:

diff --git a/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx b/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx
index a374e460ccc..78804d1800c 100644
--- a/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx
+++ b/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx
@@ -66,7 +66,7 @@ function MoneyRequestAttendeeSelector({attendees = [], onFinish, onAttendeesAdde
     const [betas] = useOnyx(ONYXKEYS.BETAS);
     const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID);
     const session = useSession();
-    const isCurrentUserAttendee = attendees.some((attendee) => attendee.accountID === session?.accountID);
+    const isCurrentUserAttendee = attendees.some((attendee) => attendee.email === session?.email);
     const [recentAttendees] = useOnyx(ONYXKEYS.NVP_RECENT_ATTENDEES);
     const policy = usePolicy(activePolicyID);
     const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});

@francoisl francoisl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should fix the "changed the attendees X, Y (previously Z)" action messages after signing back in, can you give it a try?

Comment thread src/libs/ModifiedExpenseMessage.ts Resolved
Comment thread src/libs/ModifiedExpenseMessage.ts Resolved
Comment thread src/libs/ReportUtils.ts Resolved
Comment thread src/types/onyx/OriginalMessage.ts Resolved
@francoisl

Copy link
Copy Markdown
Contributor
  1. After signing out and signing back in, the report actions for modified attendees just say " changed the expense", instead of " changed the attendees to Y (previously X)"

The server response is missing transaction modifiedAttendees. it works fine the first time due to optimistic data.

Those are built off of the OriginalMessage in the reportActions_xx, no? The changes I suggested above fix the issue for me locally, feel free to give it a try.
Basically, there's no attendees in that object type, it's always newAttendees. I know it's confusing, my guess is that the person who originally wrote this based it off of newComment/oldComment.

allroundexperts and others added 2 commits April 1, 2025 14:31
Co-authored-by: Francois Laithier <francois@expensify.com>
@allroundexperts

Copy link
Copy Markdown
Contributor Author
  1. After signing out and signing back in, the report actions for modified attendees just say " changed the expense", instead of " changed the attendees to Y (previously X)"

The server response is missing transaction modifiedAttendees. it works fine the first time due to optimistic data.

Those are built off of the OriginalMessage in the reportActions_xx, no? The changes I suggested above fix the issue for me locally, feel free to give it a try. Basically, there's no attendees in that object type, it's always newAttendees. I know it's confusing, my guess is that the person who originally wrote this based it off of newComment/oldComment.

Applied and it works!

@fedirjh

fedirjh commented Apr 1, 2025 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible 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 checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (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
    • 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 verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • 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
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • 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 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.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

@fedirjh

fedirjh commented Apr 1, 2025 •

Copy link
Copy Markdown
Contributor

Screenshots/Videos

Android: Native
CleanShot.2025-04-01.at.18.52.28.mp4
Android: mWeb Chrome
CleanShot.2025-04-01.at.18.25.39.mp4
iOS: Native
CleanShot.2025-04-01.at.18.03.40.mp4
iOS: mWeb Safari
CleanShot.2025-04-01.at.18.09.37.mp4
MacOS: Chrome / Safari
CleanShot.2025-04-01.at.17.37.38.mp4
MacOS: Desktop
CleanShot.2025-04-01.at.18.56.59.mp4

@fedirjh fedirjh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks solid

Comment on lines +333 to +336
// return false;
// To be renabled once feature is complete: https://github.com/Expensify/App/issues/44725
// Keep this disabled for per diem expense
// return iouType === CONST.IOU.TYPE.SUBMIT && !!policy?.id && (policy?.type === CONST.POLICY.TYPE.CORPORATE || policy?.type === CONST.POLICY.TYPE.TEAM);
return iouType === CONST.IOU.TYPE.SUBMIT && !!policy?.id && (policy?.type === CONST.POLICY.TYPE.CORPORATE || policy?.type === CONST.POLICY.TYPE.TEAM);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we return false here before we merge it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nah, the rest is ready so let's go ahead and release this to everyone. We'd just need to clean up the commented code here, though I'm not going to block on this so we can get this deployed asap, and I'll clean up the commented code once this is on production.

@melvin-bot
melvin-bot Bot requested a review from francoisl April 1, 2025 18:29
Comment on lines +333 to +336
// return false;
// To be renabled once feature is complete: https://github.com/Expensify/App/issues/44725
// Keep this disabled for per diem expense
// return iouType === CONST.IOU.TYPE.SUBMIT && !!policy?.id && (policy?.type === CONST.POLICY.TYPE.CORPORATE || policy?.type === CONST.POLICY.TYPE.TEAM);
return iouType === CONST.IOU.TYPE.SUBMIT && !!policy?.id && (policy?.type === CONST.POLICY.TYPE.CORPORATE || policy?.type === CONST.POLICY.TYPE.TEAM);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nah, the rest is ready so let's go ahead and release this to everyone. We'd just need to clean up the commented code here, though I'm not going to block on this so we can get this deployed asap, and I'll clean up the commented code once this is on production.

@francoisl
francoisl merged commit fdfc064 into Expensify:main Apr 2, 2025
@OSBotify

OSBotify commented Apr 2, 2025

Copy link
Copy Markdown
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.

@github-actions github-actions Bot mentioned this pull request Apr 3, 2025
86 tasks done
@github-actions

github-actions Bot commented Apr 3, 2025

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/francoisl in version: 9.1.23-1 🚀

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

// To be renabled once feature is complete: https://github.com/Expensify/App/issues/44725
// Keep this disabled for per diem expense
// return iouType === CONST.IOU.TYPE.SUBMIT && !!policy?.id && (policy?.type === CONST.POLICY.TYPE.CORPORATE || policy?.type === CONST.POLICY.TYPE.TEAM);
return iouType === CONST.IOU.TYPE.SUBMIT && !!policy?.id && (policy?.type === CONST.POLICY.TYPE.CORPORATE || policy?.type === CONST.POLICY.TYPE.TEAM);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not having invoice type check here seemed to have created this bug #59602

francoisl added a commit that referenced this pull request Apr 3, 2025
This reverts commit fdfc064, reversing
changes made to 9ccdde5.
@github-actions

github-actions Bot commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.23-7 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 success ✅

@sobitneupane

sobitneupane commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

This issue is probably caused by the changes introduced in the PR.

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