Skip to content

[$500] [Wave 6: Tags] Allow for multiple levels of tags on workspace requests #33983

Description

@yuwenmemon

Part of the Wave 6: Tags project

Main issue: #32828
Doc section: N/A (Orignal tags doc is here: https://docs.google.com/document/d/1eXGKhdUP98f6RUVYpRzxLi49El9Rizeqq-EYjrF24tU/edit)
Project: [#whatsnext] Wave 06 - Collect Submitters

Feature Description

We already support multiple levels of tags on policies in Expensify and within our workspaces. Our current code assumes you have a single tag list. We need to update it to juggle the potential for multiple tags. Thankfully, from there, the rest of the framework is already in place. We will do this by:

  • Updating MoneyRequestConfirmationList to retrieve all tags in the policy instead of just the first here. Then, when rendering the MenuItem for tag, iteratively render a single MenuItem for each tag here. The same applies to MoneyTemporaryForRefactorRequestConfirmationList.
  • Do the same thing in MoneyRequestView.
  • Adjusting the routes for tags to incorporate the tag index (discussion). This means adjusting the current routes for editing/selecting tags in the following way:
    • ${iouType}/new/tag/${reportID} -> ${iouType}/new/tag/0/${reportID}
    • create/${iouType}/tag/${transactionID}/${reportID}/ -> create/${iouType}/tag/0/${transactionID}/${reportID}/
    • r/:threadReportID/edit/:field -> r/:threadReportID/edit/:field/0
  • Then for the tag we send to the API, we create a string of all tags, by order of index, delimited by colons, like so tag1:tag2:tag3. The Expensify API already understands this format.
  • For displaying the tag, for instance when we have the tag key from getTransactionDetails, we should split the tag by the colon delimiter and display each in it's corresponding index.
  • We'll need to create a method that translates a tag index to a tag name. This would correspond to the order a tag appears in the policyTags_ OnyxKey:
    Screenshot 2024-01-04 at 12 06 11 PM
  • For any "Modified Expense" message, anytime we change a single tag level, we'll just display the entire colon-delimited tag, like we do on OldDot:
    • Screenshot 2024-01-04 at 2 27 49 PM

Manual Test Steps

  1. In OldDot, create a policy with multiple tags. One can do this by following the instructions here, and using the following csv with multiple tag levels:
    independentTags.csv
  2. Create a new workspace request
  3. Make sure you see a row rendered for each tag in the workspace
  4. Make sure that selection works for each row, and that the appropriate list of tags show for the appropriate level.
  5. Save the request, make sure that the tags save properly on the expense
  6. Open the recently saved request, make sure that the saved tag selections show up in the correct rows.
  7. Edit the request, again make sure that the selections work the same as when you created the expense, and save properly.

cc @amyevans @rezkiy37 @waterim @puneetlath

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0131596ecedabdad1c
  • Upwork Job ID: 1744420931750514688
  • Last Price Increase: 2024-01-08

Metadata

Metadata

Labels

EngineeringExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.Not a priorityReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions