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

[HOLD for payment 2025-02-04] [$250] Improvement: Add Deep Link to Search for Transactions from Card Details Page #54800

Open
1 of 8 tasks
m-natarajan opened this issue Jan 5, 2025 · 32 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Overdue

Comments

@m-natarajan
Copy link

m-natarajan commented Jan 5, 2025

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:
Reproducible in staging?:
Reproducible in production?:
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): convert

Action Performed:

Currently, users cannot directly view transactions related to a specific card from the Workspace > Company Cards > Card Details page. To enhance usability and streamline the workflow, a deep link should be added to the Card Details page that directs users to a search results page showing transactions specific to the selected card.

Expected Result:

When a user navigates to the Workspace > Company Cards > Card Details page, a deep link is available that, when clicked, takes the user directly to the search page. The search page should automatically display transactions filtered by the selected card, ensuring users can quickly review all related transactions without manually applying filters.

Actual Result:

Describe what actually happened

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence

image (4)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021876751997170063248
  • Upwork Job ID: 1876751997170063248
  • Last Price Increase: 2025-01-07
  • Automatic offers:
    • allgandalf | Reviewer | 105674089
Issue OwnerCurrent Issue Owner: @muttmuure
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 5, 2025
Copy link

melvin-bot bot commented Jan 5, 2025

Triggered auto assignment to @muttmuure (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.

@parasharrajat
Copy link
Member

parasharrajat commented Jan 5, 2025

Edited by proposal-police: This proposal was edited at 2025-01-06 08:05:14 UTC.

Proposal

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

Add A CTA to navigate to search page showing the card transactions.

What is the root cause of that problem?

New Feature

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

  1. Modify the existing Canned search util to add support for the card filter. Add a new param called cardId. When present we will change the query as follows. We can also create a new utility function if needed.
    function buildCannedSearchQuery({
function buildCannedSearchQuery({
    type = CONST.SEARCH.DATA_TYPES.EXPENSE,
    status = CONST.SEARCH.STATUS.EXPENSE.ALL,
    policyID,
    cardId,
}: {
    type?: SearchDataTypes;
    status?: SearchStatus;
    policyID?: string;
} = {}): SearchQueryString {
    let queryString = `type:${type} status:${Array.isArray(status) ? status.join(',') : status}`;

    if (policyID) {
        queryString = `type:${type} status:${Array.isArray(status) ? status.join(',') : status} policyID:${policyID}`;
    }

    if (cardId) {
        queryString = `type:${type} status:${Array.isArray(status) ? status.join(',') : status} expense-type:card card:${cardId}`;
    }

    // Parse the query to fill all default query fields with values
    const normalizedQueryJSON = buildSearchQueryJSON(queryString);
    return buildSearchQueryString(normalizedQueryJSON);
}
  1. We need to add a new Menu item to WorkspaceCompanyCardDetailsPage at the bottom like other ctas.
<MenuItem
       icon={Expensicons.SomeIcon}
       iconFill={theme.success}
       title="View transactions"
       style={styles.mv1}
       onPress={() => {
              Navigation.navigate(
                     ROUTES.SEARCH_CENTRAL_PANE.getRoute({
                            query: SearchQueryUtils.buildCannedSearchQuery(CONST.SEARCH.DATA_TYPES.EXPENSE, CONST.SEARCH.STATUS.EXPENSE.ALL, '', cardID),
                     }),
              );
       }}
/>

Note: Cleanup like using translations and types will be done on PR.

What alternative solutions did you explore? (Optional)

@mountiny mountiny added NewFeature Something to build that is a new item. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jan 5, 2025
@mountiny mountiny self-assigned this Jan 5, 2025
Copy link

melvin-bot bot commented Jan 5, 2025

Current assignee @muttmuure is eligible for the NewFeature assigner, not assigning anyone new.

@joekaufmanexpensify
Copy link
Contributor

Left thoughts here that it would also be solid to add a deep link to the wallet page on the card, so the employee can easily view the card's transactions on the search page too, as only the admin can access the card details page.

@mountiny mountiny moved this to In Progress in [#whatsnext] #convert Jan 7, 2025
@mountiny
Copy link
Contributor

mountiny commented Jan 7, 2025

Asking for who will be a c+ here

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Jan 7, 2025
Copy link

melvin-bot bot commented Jan 7, 2025

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

@melvin-bot melvin-bot bot changed the title Improvement: Add Deep Link to Search for Transactions from Card Details Page [$250] Improvement: Add Deep Link to Search for Transactions from Card Details Page Jan 7, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 7, 2025
Copy link

melvin-bot bot commented Jan 7, 2025

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 7, 2025
@mountiny
Copy link
Contributor

mountiny commented Jan 7, 2025

Looking for proposals

@DylanDylann
Copy link
Contributor

Proposal

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

Add a new button to navigate to search page with all transaction belongs the current detail card

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 need to implement a new CTA button in both the Expensify Detail Card Page and the Company Detail Card Page

In WorkspaceExpensifyCardDetailsPage and WorkspaceCompanyCardDetailsPage, add new section


<MenuItem
    icon={Expensicons.UserCheck}
    iconFill={theme.success}
    title={'Transactions from Card'}
    style={styles.mv1}
    onPress={() => {
        const queryString = useMemo(
            () =>
                SearchQueryUtils.buildQueryStringFromFilterFormValues({
                    cardID: [cardID],
                    status: 'all',
                    type: 'expense',
                }),
            [cardID],
        );
        SearchActions.clearAllFilters();
        Navigation.dismissModal();
        Navigation.navigate(
            ROUTES.SEARCH_CENTRAL_PANE.getRoute({
                query: queryString,
            }),
        );
    }}
/>

This is my demo

Screen.Recording.2025-01-08.at.11.58.52.mov

The correct UI will be need confirmed by the design team

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

What alternative solutions did you explore? (Optional)

@mountiny
Copy link
Contributor

mountiny commented Jan 8, 2025

@allgandalf can you please review?

@allgandalf
Copy link
Contributor

sir yes sirr!

@allgandalf
Copy link
Contributor

woahhhh this is a new feature, we need design mock first.

c.c. @Expensify/design can you guys please provide us the mocks for this issue, the expected result is:

When a user navigates to the Workspace > Company Cards > Card Details page, a deep link is available that, when clicked, takes the user directly to the search page. The search page should automatically display transactions filtered by the selected card, ensuring users can quickly review all related transactions without manually applying filters.

Copy link

melvin-bot bot commented Jan 10, 2025

Current assignee @mountiny is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@parasharrajat
Copy link
Member

This feature can be beneficial to Expensify cards too. Should I add a cta there as well? @shawnborton Changes are quite the same.

@parasharrajat
Copy link
Member

So I have draft ready here #55095. Waiting on above to confirm and trying to get access to a company card to be able to add screen shots for that too.

@shawnborton
Copy link
Contributor

Yeah, I think it makes sense to do this for all cards that are managed in Expensify.

@melvin-bot melvin-bot bot added the Overdue label Jan 13, 2025
@allgandalf
Copy link
Contributor

Not overdue Melv!!

@melvin-bot melvin-bot bot removed the Overdue label Jan 13, 2025
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 13, 2025
Copy link

melvin-bot bot commented Jan 13, 2025

📣 @allgandalf 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@mountiny
Copy link
Contributor

assigned, thanks!

@allgandalf
Copy link
Contributor

@parasharrajat when should we expect the PR to be out of draft ?

@parasharrajat
Copy link
Member

Trying to get access to company card first. But I think that is no possible at the moment. I will have it ready today.

@allgandalf
Copy link
Contributor

allgandalf commented Jan 15, 2025

I can add you to one of my policy as admin, that has custom feed added, mind sharing your email?

(not sure if admins can access company cards, but still)

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 15, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 28, 2025
@melvin-bot melvin-bot bot changed the title [$250] Improvement: Add Deep Link to Search for Transactions from Card Details Page [HOLD for payment 2025-02-04] [$250] Improvement: Add Deep Link to Search for Transactions from Card Details Page Jan 28, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 28, 2025
Copy link

melvin-bot bot commented Jan 28, 2025

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

Copy link

melvin-bot bot commented Jan 28, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.89-8 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 2025-02-04. 🎊

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

Copy link

melvin-bot bot commented Jan 28, 2025

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

  • [@parasharrajat / @allgandalf] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [@muttmuure] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Feb 3, 2025
Copy link

melvin-bot bot commented Feb 6, 2025

@shawnborton, @parasharrajat, @mountiny, @muttmuure, @allgandalf Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Overdue
Projects
Status: In Progress
Development

No branches or pull requests

10 participants