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

[$500] [Wave 6: Workspace Chats] Refactor ReportUtils.requiresAttentionFromCurrentUser #30668

Closed
puneetlath opened this issue Oct 31, 2023 · 32 comments
Assignees
Labels
External Added to denote the issue can be worked on by a contributor Monthly KSv2 NewFeature Something to build that is a new item. Reviewing Has a PR in review

Comments

@puneetlath
Copy link
Contributor

puneetlath commented Oct 31, 2023

Right now, ReportUtils.requiresAttentionFromCurrentUser can take either an option item or a report. This leads to some confusing to follow logic which is dependent on what type of argument its taking. Ideally we can clean this up to either:

  1. take a specific type, not both
  2. use clearer logic depending on the type
  3. something else
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019b604f4627d28c77
  • Upwork Job ID: 1724144016716673024
  • Last Price Increase: 2023-11-13
@waterim
Copy link
Contributor

waterim commented Nov 12, 2023

Hello, Im Artem from Callstack and would like to help with this issue!

Copy link

melvin-bot bot commented Nov 13, 2023

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

@puneetlath puneetlath added the External Added to denote the issue can be worked on by a contributor label Nov 13, 2023
@melvin-bot melvin-bot bot changed the title Refactor ReportUtils.requiresAttentionFromCurrentUser [$500] Refactor ReportUtils.requiresAttentionFromCurrentUser Nov 13, 2023
Copy link

melvin-bot bot commented Nov 13, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 13, 2023
Copy link

melvin-bot bot commented Nov 13, 2023

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 13, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 13, 2023
Copy link

melvin-bot bot commented Nov 13, 2023

📣 @sobitneupane Please request via NewDot manual requests for the Reviewer role ($500)

@puneetlath
Copy link
Contributor Author

@waterim can you please post a proposal with your general planned approach for us to agree on before starting the PR? Thanks!

@waterim
Copy link
Contributor

waterim commented Nov 13, 2023

Sure, thank you, one question
2. use clearer logic depending on the type
3. something else

Do we have some specific requirements for these steps?

@puneetlath
Copy link
Contributor Author

Nothing thought through. Just that right now the function is confusing because it is in ReportUtils, but is technically called with both reports and optionItems. And reports and optionItems don't have all the same properties and that makes the code both more confusing and more likely to have a bug introduced. And we seem to already have run into at least one bug as a result.

@melvin-bot melvin-bot bot added the Overdue label Nov 20, 2023
@sobitneupane
Copy link
Contributor

@waterim Which logics are shared between optionItem and report? What are the distinct logics for each?

const isOption = !!option.parentReportAction

I believe relying on a field such as parentReportAction to ascertain isOption is not ideal. Instead, I would prefer passing isOption as a function argument if its value can be determined in advance.

To get rid of confusing logic, the best way to go will be splitting the function.

@melvin-bot melvin-bot bot removed the Overdue label Nov 20, 2023
@greg-schroeder greg-schroeder changed the title [$500] Refactor ReportUtils.requiresAttentionFromCurrentUser [$500] [Wave 6: Workspace Chats] Refactor ReportUtils.requiresAttentionFromCurrentUser Nov 20, 2023
@puneetlath
Copy link
Contributor Author

The downside of two separate functions is that they need to use the same logic and have the potential to get out of sync. So I think I like the typescript types approach and we do it once https://github.com/Expensify/App/pull/29012/files is done. What do y'all think about that?

@sobitneupane
Copy link
Contributor

@puneetlath I agree. We can just wait for #29012 to get merged. It is being actively worked on.

@melvin-bot melvin-bot bot added the Overdue label Nov 24, 2023
@puneetlath puneetlath changed the title [$500] [Wave 6: Workspace Chats] Refactor ReportUtils.requiresAttentionFromCurrentUser [HOLD #29012] [$500] [Wave 6: Workspace Chats] Refactor ReportUtils.requiresAttentionFromCurrentUser Nov 25, 2023
@puneetlath
Copy link
Contributor Author

Still holding on #29012

@melvin-bot melvin-bot bot removed the Overdue label Nov 25, 2023
@puneetlath puneetlath changed the title [HOLD #29012] [$500] [Wave 6: Workspace Chats] Refactor ReportUtils.requiresAttentionFromCurrentUser [$500] [Wave 6: Workspace Chats] Refactor ReportUtils.requiresAttentionFromCurrentUser Nov 27, 2023
@melvin-bot melvin-bot bot added the Overdue label Nov 27, 2023
@puneetlath
Copy link
Contributor Author

ReportUtils to TS was merged, so you're unblocked from going forward here @waterim

@melvin-bot melvin-bot bot removed the Overdue label Nov 27, 2023
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 29, 2023
@puneetlath
Copy link
Contributor Author

How's this going @waterim?

@waterim
Copy link
Contributor

waterim commented Dec 4, 2023

@puneetlath Updated today, waiting for C+ answers

@puneetlath
Copy link
Contributor Author

Ok great.

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Dec 28, 2023
Copy link

melvin-bot bot commented Dec 28, 2023

This issue has not been updated in over 15 days. @puneetlath, @sobitneupane, @waterim eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@puneetlath
Copy link
Contributor Author

@sobitneupane @waterim everything is done here right? If so, all that is left is to pay @sobitneupane for C+?

@sobitneupane
Copy link
Contributor

Yep @puneetlath.

@puneetlath
Copy link
Contributor Author

Great. Please request on NewDot.

Payment summary:

@JmillsExpensify
Copy link

$500 approved for @sobitneupane based on comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Added to denote the issue can be worked on by a contributor Monthly KSv2 NewFeature Something to build that is a new item. Reviewing Has a PR in review
Projects
No open projects
Development

No branches or pull requests

6 participants