Skip to content

[HOLD for payment 2024-01-17] [$500] Chat - Send money text displayed in workspace chat #33003

Closed

Description

@kbecciv

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: v1.4.12-0
Reproducible in staging?: y
Reproducible in production?: y
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: Applause - Internal team
Slack conversation:

Action Performed:

  1. Open the app
  2. Open any workspace chat and scroll on top
  3. Observe the text 'You can also use the + button to send money, request money, or assign a task!' has send money even though send money is not possible to workspace chat
  4. Confirm the options by clicking on plus besides compose box and observe that it does not have 'send money' option

Expected Result:

App should not display 'Send money' text in workspace chat as send money to workspace is not possible

Actual Result:

App displays 'Send money' text in workspace chat even though send money to workspace is not possible

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6311965_1702487338065.windows_chrome_-_send_money_in_workspace_chat.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0184e5f006c16a747a
  • Upwork Job ID: 1735020266743328768
  • Last Price Increase: 2023-12-20
  • Automatic offers:
    • Ollyws | Reviewer | 28067635
    • ZhenjaHorbach | Contributor | 28067636
Issue OwnerCurrent Issue Owner: @miljakljajic

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 13, 2023
  2. changed the title [-]Chat - Send money text displayed in workspace chat[/-] [+][$500] Chat - Send money text displayed in workspace chat[/+] on Dec 13, 2023
  3. melvin-bot commented on Dec 13, 2023

    @melvin-bot
  4. melvin-bot commented on Dec 13, 2023

    @melvin-bot

    Triggered auto assignment to @miljakljajic (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 13, 2023
  6. melvin-bot commented on Dec 13, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. melvin-bot commented on Dec 13, 2023

    @melvin-bot

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

  8. Berndy commented on Dec 13, 2023

    @Berndy

    Proposal

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

    The displayed text mentions being able to send money, despite this not being the case in workspace chats.

    What is the root cause of that problem?

    We check if money request options contain send OR request to decide whether we display the text or not.

    {(moneyRequestOptions.includes(CONST.IOU.TYPE.SEND) || moneyRequestOptions.includes(CONST.IOU.TYPE.REQUEST)) && (
    <Text>{props.translate('reportActionsView.usePlusButton')}</Text>
    )}

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

    We need to add another text for workspace chats, which doesn't mention sending money. Then decide which text to render based on which money request options we have available

    usePlusButton: '\n\nYou can also use the + button to send money, request money, or assign a task!',

    usePlusButton: '\n\n¡También puedes usar el botón + de abajo para enviar dinero, pedir dinero, o asignar una tarea!',

    I suggest we add usePlusButtonWorkspace, then display the current text only if we can send and request, or the workspace text if we can only request.

    What alternative solutions did you explore? (Optional)

  9. ZhenjaHorbach commented on Dec 13, 2023

    @ZhenjaHorbach
    Contributor

    Proposal

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

    Chat - Send money text displayed in workspace chat

    What is the root cause of that problem?

    We have static text for usePlusButton

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

    To fix this we can synchronize with the available buttons we have in the AttachmentPicker

    return _.map(ReportUtils.getMoneyRequestOptions(report, reportParticipantIDs), (option) => ({
    ...options[option],
    }));

    For this, we can use logic from AttachmentPicker and get a list of available moneyRequestOptions

    const moneyRequestOptions = ReportUtils.getMoneyRequestOptions(props.report, participantAccountIDs);

    And then update usePlusButton translate to be able to pass custom properties (

    <Text>{props.translate('reportActionsView.usePlusButton')}</Text>

            usePlusButton: ({options}: {options: string[]}) => {
                const actions = options.map((item: string) => `${item} money`).join(', '); // We can move this logic inside ReportWelcomeText and pass only additional text instead options 
                const additionalText = actions ? `${actions}, or` : '';
                return `\n\nYou can also use the + button to ${additionalText} assign a task!`;
            },
    

    Plus It's strange that we ignore the split option. I think we also need to enable this option for showing in translate

    What alternative solutions did you explore? (Optional)

    As alternative we can create translate for every case
    And depending on the availability of a particular button, show the translation

  10. yh-0218 commented on Dec 13, 2023

    @yh-0218
    Contributor

    Proposal

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

    Chat - Send money text displayed in workspace chat

    What is the root cause of that problem?

    Because we use static text here

    <Text>{props.translate('reportActionsView.usePlusButton')}</Text>

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

    1. first we need to get dynamic text.
    // this is test, we need to update more.
     const addedText = useMemo(() => {
            let temp = '';
            moneyRequestOptions.forEach((option) => {
                if(option.includes(CONST.IOU.TYPE.SPLIT)) {
                    temp = temp? `${temp}, split bill` : 'split bill'
                }
                if(option.includes(CONST.IOU.TYPE.SEND)) {
                    temp = temp? `${temp}, send money` : 'send money'
                }
                if(option.includes(CONST.IOU.TYPE.REQUEST)) {
                    temp = temp? `${temp}, request money` : 'request money'
                } 
            });
            return temp;
        }, [moneyRequestOptions])
    1. we need to change to dynamic text
            {(addedText) && (
                        <Text>{props.translate('reportActionsView.usePlusButton', {addedText})}</Text>
             )}

    What alternative solutions did you explore? (Optional)

    Screen.Recording.2023-12-13.at.10.50.02.PM.mov
  11. Ollyws commented on Dec 17, 2023

    @Ollyws
    Contributor

    I like @ZhenjaHorbach's proposal but better to go with We can move this logic inside ReportWelcomeText and pass only additional text instead options as suggested in the comment.
    🎀👀🎀 C+ reviewed

  12. 24 remaining items

  13. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Jan 10, 2024
  14. changed the title [-][$500] Chat - Send money text displayed in workspace chat[/-] [+][HOLD for payment 2024-01-17] [$500] Chat - Send money text displayed in workspace chat[/+] on Jan 10, 2024
  15. melvin-bot commented on Jan 10, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  16. melvin-bot commented on Jan 10, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.23-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-01-17. 🎊

    For reference, here are some details about the assignees on this issue:

  17. melvin-bot commented on Jan 10, 2024

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@Ollyws] The PR that introduced the bug has been identified. Link to the PR:
    • [@Ollyws] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@Ollyws] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@Ollyws] Determine if we should create a regression test for this bug.
    • [@Ollyws] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@miljakljajic] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  18. miljakljajic commented on Jan 17, 2024

    @miljakljajic
    Contributor

    @Ollyws can you accept the offer? @ZhenjaHorbach , paid!

  19. Ollyws commented on Jan 17, 2024

    @Ollyws
    Contributor

    BugZero Checklist:

    • The PR that introduced the bug has been identified. Link to the PR:

    We've been using a static message for this since it was implemented so I don't think we can really pin it on a PR, it's more of a new feature.

    • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

    N/A

    • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

    N/A

    • Determine if we should create a regression test for this bug.

    Yes.

    • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

    Regression Test Proposal

    1. Open the app
    2. Open any workspace chat and scroll on top
    3. Observe the text 'You can also use the + button to send money, request money, or assign a task!' has synchronized with available money options in + menu
    

    Do we agree 👍 or 👎

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions