-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Awaiting Payment] [$250] Multi tags - Main tag shows "Required" status when all the subtags are disabled #48683
Comments
Triggered auto assignment to @garrettmknight ( |
Edited by proposal-police: This proposal was edited at 2024-09-06 10:27:23 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Multi tags - Main tag shows "Required" status when all the subtags are disabled What is the root cause of that problem?We are not checking if it has one enabled tag when displaying required tag here
It is gone after opening the tag because we set required to false here App/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx Lines 235 to 236 in 2ee0bfc
What changes do you think we should make in order to solve the problem?We should add
In WorkspaceViewTagsPage we can apply the same condition to switch of the required toggle or we can also disable the toggle when there are no enabled tags. What alternative solutions did you explore? (Optional)We can also setPolicyTagsRequired to false in WorkspaceTagsPage as we did here. |
Checking for a regression on the linked PR |
To hide the "Required" label when all tags are disabled, we should implement a similar check to what we applied for the Required toggle. The current check only verifies if the policyTagList is required, but it doesn't account for the scenario where all subtags are disabled in this :
We can update the logic as follows: labelText={policyTagList.required && !!Object.values(policyTagList?.tags ?? {}).some((tag) => tag.enabled) ? translate('common.required') : undefined} This way, the label will only appear if the main tag is required and at least one subtag is enabled. Additionally, I'm not sure if this issue is a regression—it seems more like a separate bug that was overlooked in the previous implementation. |
@garrettmknight I’ve opened a PR #48738 to address this issue. It’s now ready for review. Thank you. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Just 🟢 Approved the PR for this 🚀 FYI we determined that the other issue didn't cause this as in regression but moreso revealed some incomplete logic, therefore this should not be treated as a regression coming from the other issue's PR - more context in #47818 (comment) (see comment above for proof). Given the context above, I guess payment should be treated separately for this issue as I noticed automation already created payment issue #48766 once I approved the PR. |
@garrettmknight I think melvin got too excited and created a payment issue, maybe because this hadn't been moved to "external" before the PRs were approved? I'm going to close #48766 in favor of processing payment here, on the main issue |
Job added to Upwork: https://www.upwork.com/jobs/~021833824644157847399 |
Current assignee @ikevin127 is eligible for the External assigner, not assigning anyone new. |
📣 @ikevin127 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @Shahidullah-Muffakir You have been assigned to this job! |
@FitseTLT appreciate that you put forward a proposal for this, I'll pay you half if your proposal matches what was implemented. |
@ikevin127 @Shahidullah-Muffakir I'll pay you both out for this issue since it's a diff one than the other we highlighted. |
@ikevin127 can your review this proposal and let me know if it was significantly similar to the PR that solves this bug? |
No it doesn't match @garrettmknight |
@garrettmknight, |
I confirm that the proposed solution and the one applied in the PR completely different. |
@Shahidullah-Muffakir just sent you an offer. |
@garrettmknight Thank you, accepted. |
I did not receive the payment yet, here's the contract: https://www.upwork.com/nx/wm/workroom/38345594. In case I'm mistaking and I did receive the payment already - please dismiss 👍 |
All paid out, sorry for the wait! @ikevin127 can you complete the checklist when you get a chance? |
Regression Test Proposal
Do we agree 👍 or 👎. |
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.30-4
Reproducible in staging?: Y
Reproducible in production?: Y
Found when validation PR: #48381
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Precondition:
Expected Result:
The main tag will not show "Required" status when all the subtags are disabled.
Actual Result:
The main tag shows "Required" status when all the subtags are disabled.
The "Required" status is gone after reopening the subtag list.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6594733_1725578358405.1725577741534_Screen_Recording_20240906_070850_New_Expensify.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @ikevin127The text was updated successfully, but these errors were encountered: