-
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
Clicking Categorize this expense leads to enter an email or phone number page #52334
Comments
Triggered auto assignment to @VictoriaExpensify ( |
Edited by proposal-police: This proposal was edited at 2024-11-11 20:08:32 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.List of workspaces displayed and option to create workspace and field to enter email , phone number displayed What is the root cause of that problem?New feature What changes do you think we should make in order to solve the problem?We should add the primary workspace as a single participant by adding
What alternative solutions did you explore? (Optional)Screen.Recording.2024-11-12.at.03.07.34.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.Clicking Categorize this expense leads to enter an email or phone number page when there is a Primary Workspace What is the root cause of that problem?New feature What changes do you think we should make in order to solve the problem?
function createDraftTransactionAndNavigateToParticipantSelector(transactionID: string, reportID: string, actionName: IOUAction, reportActionID: string, activePolicyID?: string): void {
const transaction = allTransactions?.[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`] ?? ({} as Transaction);
const reportActions = allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`] ?? ([] as ReportAction[]);
const activePolicy = getPolicy(activePolicyID);
if (!transaction || !reportActions) {
return;
}
const linkedTrackedExpenseReportAction = Object.values(reportActions)
.filter(Boolean)
.find((action) => ReportActionsUtils.isMoneyRequestAction(action) && ReportActionsUtils.getOriginalMessage(action)?.IOUTransactionID === transactionID);
const {created, amount, currency, merchant, mccGroup} = getTransactionDetails(transaction) ?? {};
const comment = getTransactionCommentObject(transaction);
const policyExpenseChat = getPolicyExpenseChat(activePolicy?.ownerAccountID ?? -1, activePolicyID ?? '-1');
const isCategorize = actionName === CONST.IOU.ACTION.CATEGORIZE;
IOU.createDraftTransaction({
...transaction,
actionableWhisperReportActionID: reportActionID,
linkedTrackedExpenseReportAction,
linkedTrackedExpenseReportID: reportID,
created,
modifiedCreated: undefined,
modifiedAmount: undefined,
modifiedCurrency: undefined,
amount,
currency,
comment,
merchant,
modifiedMerchant: '',
mccGroup,
...(activePolicy && isCategorize && policyExpenseChat
? {
participants: [
{
selected: true,
accountID: 0,
isPolicyExpenseChat: true,
reportID: policyExpenseChat?.reportID,
policyID: activePolicy?.id,
searchText: activePolicy?.name,
},
],
}
: {}),
} as Transaction);
const filteredPolicies = Object.values(allPolicies ?? {}).filter(
(policy) => policy && policy.type !== CONST.POLICY.TYPE.PERSONAL && policy.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
);
if (isCategorize && activePolicy && policyExpenseChat) {
Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CATEGORY.getRoute(actionName, CONST.IOU.TYPE.SUBMIT, transactionID, policyExpenseChat?.reportID));
return;
}
if (actionName === CONST.IOU.ACTION.SUBMIT || (allPolicies && filteredPolicies.length > 0)) {
Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(CONST.IOU.TYPE.SUBMIT, transactionID, reportID, undefined, actionName));
return;
}
return createDraftWorkspaceAndNavigateToConfirmationScreen(transactionID, actionName);
} What alternative solutions did you explore? (Optional)Result |
@VictoriaExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
There's been a fair bit of internal discussion on this but I want to make sure we're not doubling up. Posted here to find out if this is already being worked on elsewhere |
Yep, being worked on here. Closing! |
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.0.59-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @quinthar
Slack conversation (hyperlinked to channel name): ts_external_expensify_expense
Action Performed:
Expected Result:
If user have Primary Workspace, the expense should be moved to that workspace, Categories list to select and If no workspace option to create a workspace
Actual Result:
List of workspaces displayed and option to create workspace and field to enter email , phone number displayed
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Recording.738.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: