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 2024-11-13] [HOLD for payment 2024-10-30] A newly added card under the Members section does not appear in the Assigned Cards section. #50441

Closed
1 of 6 tasks
m-natarajan opened this issue Oct 8, 2024 · 38 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Oct 8, 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: 9.0.46-2
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: @jayeshmangwani
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1728308001803959

Action Performed:

  1. Navigate to Settings > Workspaces > Select any workspace that has Expensify Cards enabled and where you have permissions to add a card.
  2. Go to Members > Select any member > New Card.
  3. Fill in the card details and complete the issue card flow.
  4. Check the Assigned Cards section under the member's details.

Expected Result:

The card should be added to the Assigned Cards section immediately.

Actual Result:

The card does not appear until you navigate away to Workspaces and then return to the Member details page.

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

BUG-card-does-not-update-on-member.mov
Recording.637.mp4
Add any screenshot/video evidence

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @stephanieelliott
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 8, 2024
Copy link

melvin-bot bot commented Oct 8, 2024

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

@mountiny
Copy link
Contributor

mountiny commented Oct 8, 2024

@koko57 We need to add the card optimistically to the cards_ collection to show there, I believe you already working on that elsewhere, if so, can you comment so I can assign you? thanks!

@koko57
Copy link
Contributor

koko57 commented Oct 9, 2024

yes, I can work on that with #50248 and #50467 - they are related so I will fix them all in one PR

@stephanieelliott
Copy link
Contributor

@koko57 can you link the PR when you have it?

@koko57
Copy link
Contributor

koko57 commented Oct 11, 2024

@stephanieelliott yes! I'm still working on it. Sorry for not posting updates here, I left some in these two other issues I mentioned. We also had a discussion yesterday on how to solve this problem on Slack

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 11, 2024
@koko57
Copy link
Contributor

koko57 commented Oct 11, 2024

it looks like it's rather the same root cause as #50467, here we don't have the info for which type of card it happened. If for both it could be due to some error - the error handling is applied here: #50644

cc @mountiny

@koko57
Copy link
Contributor

koko57 commented Oct 11, 2024

I'll be ooo Monday - Tuesday (14-15 Oct) if there will be some changes required to my PR and you'd like to merge it asap - please ping Callstack team, someone might be able to take it over. Thanks!

@mountiny
Copy link
Contributor

Thanks, yeah I think we are nicely streamlining the process now

@stephanieelliott
Copy link
Contributor

Hey @koko57 any update on this one?

@DylanDylann
Copy link
Contributor

the PR is merged and deployed to staging

@koko57
Copy link
Contributor

koko57 commented Oct 23, 2024

yes, it's merged and can be retested. Sorry for no update!

@mountiny
Copy link
Contributor

Asked for a retest here

@m-natarajan
Copy link
Author

Still able to reproduce, card not appears even after refresh

bandicam.2024-10-23.16-22-08-725.mp4

@koko57
Copy link
Contributor

koko57 commented Oct 23, 2024

this one is definitely strange, maybe some other changes broke it in the meantime, I will look at this tomorrow

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 23, 2024
@koko57
Copy link
Contributor

koko57 commented Oct 24, 2024

When I was issuing a card for myself I could not reproduce. The cards were added properly. But when I invited a new member any card that I've added haven't appeared in the list.

Screenshot 2024-10-24 at 13 02 45

It's because we're using a wrong(?) Onyx key for querying cards

Screenshot 2024-10-24 at 13 01 44

and that's why we don't get the newly created card - observe that for the cards_ collection we have a new card.
Screenshot 2024-10-24 at 13 01 29

I need to look at why we use this key, why it only stores the current user's (not an invitee's) card and if the key is used for company cards.

@koko57
Copy link
Contributor

koko57 commented Oct 24, 2024

@mountiny - this was an intentional change, Vicky left a comment why it was necessary. Now I need to figure out a solution, maybe query for both cards_ and cardList? And then filter out the ones already in the cards_ object?

@VickyStash
Copy link
Contributor

I've answered about the reason of cards_ -> cardList_ update here: #49928 (comment)

But does the cardList_ key store only current user cards?
If so, to show all user related cards from different feeds we need to:

  1. Do multiple calls to get cards for every feed
  2. Have an API call to get all of the cards for all of the feeds

@koko57
Copy link
Contributor

koko57 commented Oct 24, 2024

But can't we query cards_ for expensify cards and feeds separately? If I understand it correctly cardList contains Expensify Cards and Feeds?

@koko57
Copy link
Contributor

koko57 commented Oct 24, 2024

And the question is why the cards for another member doesn't appear in the cardList? Is it because for the current user (admin) only there is an additional logic on the backend that adds any card (Expensify or 3rd party) to the cardList object?

@VickyStash
Copy link
Contributor

But can't we query cards_ for expensify cards and feeds separately? If I understand it correctly cardList contains Expensify Cards and Feeds?

The thing is that cardList_ key populated by OpenApp command. So it has the data right away.
To populate cards_ key we need to do API calls to get the data.
It can be 6+ calls, for example, if we need to get Expensify cards + 5 feeds cards.

@koko57
Copy link
Contributor

koko57 commented Oct 24, 2024

I see that when I'm issuing a card for myself I get the cardList object in OnyxData - which I don't get when creating a card for another member
Screenshot 2024-10-24 at 14 08 42Screenshot 2024-10-24 at 14 09 09

@mountiny
Copy link
Contributor

Ok yeah i was wondering if thsi is the issue. The two onyx keys hold different values

cardList is all your cards those that you as the currently assigned user own

cards_ collection is only for the domain admins where you can see all the cards on particular feed.

So i think what we need to do is update the member details page to look at cardList if its your own page (the signed in user) and the cards_ if not.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Oct 25, 2024
@koko57
Copy link
Contributor

koko57 commented Oct 25, 2024

PR opened for review #50441

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 29, 2024
@DylanDylann
Copy link
Contributor

Asking for the next step

Copy link

melvin-bot bot commented Oct 30, 2024

Payment Summary

Upwork Job

  • Contributor: @koko57 is from an agency-contributor and not due payment
  • ROLE: @DylanDylann paid $(AMOUNT) via Upwork (LINK)

BugZero Checklist (@stephanieelliott)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@stephanieelliott
Copy link
Contributor

stephanieelliott commented Oct 31, 2024

Summarizing payment on this issue:

  • Contributor: N/A (agency)
  • Contributor+: @DylanDylann $250 via Upwork - PAID

Upwork job is here: https://www.upwork.com/jobs/~021851906318833506897

@DylanDylann
Copy link
Contributor

@stephanieelliott Done

@stephanieelliott
Copy link
Contributor

All paid!

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Nov 6, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-10-30] A newly added card under the Members section does not appear in the Assigned Cards section. [HOLD for payment 2024-11-13] [HOLD for payment 2024-10-30] A newly added card under the Members section does not appear in the Assigned Cards section. Nov 6, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 6, 2024
Copy link

melvin-bot bot commented Nov 6, 2024

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

Copy link

melvin-bot bot commented Nov 6, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.57-10 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-11-13. 🎊

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

  • @koko57 does not require payment (Contractor)
  • @DylanDylann requires payment (Needs manual offer from BZ)
  • @jayeshmangwani requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Nov 6, 2024

@DylanDylann @stephanieelliott The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

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 Bug Something is broken. Auto assigns a BugZero manager. Weekly KSv2
Projects
No open projects
Status: Polish
Development

No branches or pull requests

6 participants