Skip to content
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

[$250] Track expense-In self DM, create expense is shown instead track expense #52897

Closed
1 of 8 tasks
IuliiaHerets opened this issue Nov 21, 2024 · 22 comments
Closed
1 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 21, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.0.65-1
Reproducible in staging?: Y
Reproducible in production?: Y
Isuue was found when executing this PR: #52786
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Login with new gmail account
  3. Open self DM
  4. Tap plus icon next to chat input

Expected Result:

In self DM, track expense must be shown .

Actual Result:

In self DM, create expense is shown instead track expense.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6671460_1732161962885.Screenrecorder-2024-11-21-09-31-54-5.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021861530490609565618
  • Upwork Job ID: 1861530490609565618
  • Last Price Increase: 2024-12-10
Issue OwnerCurrent Issue Owner: @ahmedGaber93
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 21, 2024
Copy link

melvin-bot bot commented Nov 21, 2024

Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@mkzie2
Copy link
Contributor

mkzie2 commented Nov 21, 2024

Edited by proposal-police: This proposal was edited at 2024-11-21 13:15:52 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

In self DM, create expense is shown instead track expense.

What is the root cause of that problem?

We display Create expense if canUseCombinedTrackSubmit is true.

icon: canUseCombinedTrackSubmit ? getIconForAction(CONST.IOU.TYPE.CREATE) : getIconForAction(CONST.IOU.TYPE.TRACK),
text: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),

What changes do you think we should make in order to solve the problem?

I think we should display Track expense for all case in the plus icon of SelfDM

icon:  getIconForAction(CONST.IOU.TYPE.TRACK),
text: translate('iou.trackExpense'),

icon: canUseCombinedTrackSubmit ? getIconForAction(CONST.IOU.TYPE.CREATE) : getIconForAction(CONST.IOU.TYPE.TRACK),
text: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),

OPTIONAL: We can also change this to always display Track expense

[CONST.IOU.TYPE.TRACK]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),

What alternative solutions did you explore? (Optional)

NA

@melvin-bot melvin-bot bot added the Overdue label Nov 25, 2024
Copy link

melvin-bot bot commented Nov 25, 2024

@abekkala Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@abekkala
Copy link
Contributor

confirmed in slack that it should be track

@melvin-bot melvin-bot bot removed the Overdue label Nov 26, 2024
@abekkala abekkala added External Added to denote the issue can be worked on by a contributor Overdue labels Nov 26, 2024
Copy link

melvin-bot bot commented Nov 26, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021861530490609565618

@melvin-bot melvin-bot bot changed the title Track expense-In self DM, create expense is shown instead track expense [$250] Track expense-In self DM, create expense is shown instead track expense Nov 26, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 26, 2024
Copy link

melvin-bot bot commented Nov 26, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (External)

@FitseTLT
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Track expense-In self DM, create expense is shown instead track expense

What is the root cause of that problem?

We set the menu item to create expense if canUseCombinedTrackSubmit permission is on for IOU.TYPE.TRACK here

[CONST.IOU.TYPE.TRACK]: {
icon: canUseCombinedTrackSubmit ? getIconForAction(CONST.IOU.TYPE.CREATE) : getIconForAction(CONST.IOU.TYPE.TRACK),
text: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),

and then we remove the duplicate create expense menu item here because for canUseCombinedTrackSubmit both track and submit are set to Create expense
return canUseCombinedTrackSubmit
? // Removes track option for the workspace with the canUseCombinedTrackSubmit enabled
moneyRequestOptionsList.filter((item, index, self) => index === self.findIndex((t) => t.text === item.text))
: moneyRequestOptionsList;

and then we set the IOUStartPage title to create expense to similarly for canUseCombinedTrackSubmit case here

[CONST.IOU.TYPE.TRACK]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),

What changes do you think we should make in order to solve the problem?

We need to set it to track for CONST.IOU.TYPE.TRACK whether or not canUseCombinedTrackSubmit is on

[CONST.IOU.TYPE.TRACK]: {
icon: canUseCombinedTrackSubmit ? getIconForAction(CONST.IOU.TYPE.CREATE) : getIconForAction(CONST.IOU.TYPE.TRACK),
text: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),

[CONST.IOU.TYPE.TRACK]: {
                icon: getIconForAction(CONST.IOU.TYPE.TRACK),
                text: translate('iou.trackExpense'),
                onSelected: () => selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, report?.reportID ?? '-1'), true),
            },

and update IOUStartPage title here

[CONST.IOU.TYPE.TRACK]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),

        [CONST.IOU.TYPE.TRACK]: translate('iou.trackExpense'),

then we also don't need the filter code here anymore

return canUseCombinedTrackSubmit
? // Removes track option for the workspace with the canUseCombinedTrackSubmit enabled
moneyRequestOptionsList.filter((item, index, self) => index === self.findIndex((t) => t.text === item.text))
: moneyRequestOptionsList;

        return moneyRequestOptionsList;

What alternative solutions did you explore? (Optional)

@ahmedGaber93
Copy link
Contributor

reviewing today

@ahmedGaber93
Copy link
Contributor

function canUseCombinedTrackSubmit(): boolean {
// We don't need to show this to all betas since this will be used for developing a feature for A/B testing.
const session = SessionUtils.getSession();
return isAccountIDEven(session?.accountID ?? -1);
}

According to the above comment, this is A/B testing feature, and "create expense" will display for even number account IDs. So I think this intended for A/B testing purpose and not an issue

@FitseTLT
Copy link
Contributor

function canUseCombinedTrackSubmit(): boolean {
// We don't need to show this to all betas since this will be used for developing a feature for A/B testing.
const session = SessionUtils.getSession();
return isAccountIDEven(session?.accountID ?? -1);
}

According to the above comment, this is A/B testing feature, and "create expense" will display for even number account IDs. So I think this intended for A/B testing purpose and not an issue

This is not beta feature and it affects users in production with even numbered account ids and the problem here is showing create in place of track we only intended to replace submit with create so this is still a valid bug that affects users in production hence the slack confirmation here

cc @abekkala

@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Dec 2, 2024

we only intended to replace submit with create

@FitseTLT The #49691 OP addressed the three actions that needed to replace with create, and the action track is one of them. See the Goal section.

@ahmedGaber93
Copy link
Contributor

confirmed in slack that it should be track

@abekkala Just for confirmation, was it taken into consideration that this behavior is not a bug and that it is for A/B testing purpose, and you decide to disable A/B testing here?

More information here #49691 in OP Goal section.

@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 2, 2024

we only intended to replace submit with create

@FitseTLT The #49691 OP addressed the three actions that needed to replace with create, and the action track is one of them. See the Goal section.

I know @ahmedGaber93 but I think they have decided to exclude track now and only apply it to submit considering the slack confirmation. @grgia as you were the creator of the A/B testing issue do you confirm the eligibility of this issue and we should only replace submit with create and leave track as it is. I think @abekkala got a slack confirmation for it here

@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 3, 2024
Copy link

melvin-bot bot commented Dec 3, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Dec 5, 2024

@abekkala @ahmedGaber93 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Dec 5, 2024
@ahmedGaber93
Copy link
Contributor

@abekkala bump #52897 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Dec 5, 2024
@abekkala
Copy link
Contributor

abekkala commented Dec 6, 2024

@grgia since you're familiar with this can you confirm #52897 (comment)

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

Copy link

melvin-bot bot commented Dec 10, 2024

@abekkala, @ahmedGaber93 Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Dec 10, 2024
@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Dec 10, 2024

WDYT @grgia ^?

@melvin-bot melvin-bot bot removed the Overdue label Dec 10, 2024
Copy link

melvin-bot bot commented Dec 10, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@ahmedGaber93
Copy link
Contributor

Bumped @grgia on slack

@grgia grgia self-assigned this Dec 12, 2024
@grgia
Copy link
Contributor

grgia commented Dec 12, 2024

Closing for #53656

@grgia grgia closed this as completed Dec 12, 2024
@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in [#whatsnext] #expense Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Status: Done
Development

No branches or pull requests

7 participants