-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: update employee tax exemption category link in workspace #3472
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
Conversation
WalkthroughIn the HRMS Payroll Tax & Benefits workspace JSON, a Link entry’s label was changed from "Employee Tax Exemption Declaration Category" to "Employee Tax Exemption Category". The link_to target was updated to the same new value. The modified timestamp was updated to 2025-08-18 14:57:19.891513. All other fields remain unchanged. Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
hrms/patches.txt (1)
35-35
: Patch works, but consider robustness across multiple matches and cross-version support
- Using execute:frappe.db.set_value with a filters dict is concise and should no-op safely if nothing matches. However, set_value with filters updates only the first matching row. If multiple child rows exist (duplicates), some sites could remain inconsistent.
- Also verify that using set_value with filters is supported on all target backports (v14/v15). If not, fall back to get_all + loop.
Optional refactor: move this into a dedicated patch module and update all matches.
- execute:frappe.db.set_value("Workspace Link", {"parent": "Tax & Benefits", "parentfield": "links", "link_to": "Employee Tax Exemption Declaration Category"}, {"label": "Employee Tax Exemption Category", "link_to": "Employee Tax Exemption Category"}) + hrms.patches.v15_0.fix_tax_benefits_workspace_linkExample patch module (create file hrms/patches/v15_0/fix_tax_benefits_workspace_link.py):
import frappe def execute(): filters = { "parent": "Tax & Benefits", "parentfield": "links", "link_to": "Employee Tax Exemption Declaration Category", } names = frappe.get_all("Workspace Link", filters=filters, pluck="name") for name in names: frappe.db.set_value( "Workspace Link", name, {"label": "Employee Tax Exemption Category", "link_to": "Employee Tax Exemption Category"}, )If you want, I can open a follow-up to move this into a proper patch module and backport it to v14/v15.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
hrms/patches.txt
(1 hunks)hrms/payroll/workspace/tax_&_benefits/tax_&_benefits.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Python Unit Tests (2)
- GitHub Check: Python Unit Tests (1)
- GitHub Check: Summary
🔇 Additional comments (3)
hrms/payroll/workspace/tax_&_benefits/tax_&_benefits.json (1)
65-68
: Correcting the workspace link target and label — LGTMChanging both label and link_to to “Employee Tax Exemption Category” looks correct and aligns the workspace with the actual DocType.
hrms/patches.txt (2)
34-34
: Confirm the addition of unrelated patch entryThis line appears unrelated to the workspace link fix. Please confirm it’s intentional and not an accidental inclusion, as it alters the patch sequence.
hrms.patches.v15_0.call_set_total_advance_paid_on_advance_documents #2025-07-08
If unintentional, remove it from this PR to keep scope tight.
35-35
: Verified — dict-filters for frappe.db.set_value are already used in this repoFound multiple existing usages of frappe.db.set_value that accept dict filters / dict-valued updates, so the line in hrms/patches.txt is consistent with current patterns.
Files/locations demonstrating this:
- hrms/patches.txt:35 — execute:frappe.db.set_value("Workspace Link", {"parent": "Tax & Benefits", "parentfield": "links", "link_to": "Employee Tax Exemption Declaration Category"}, {"label": "Employee Tax Exemption Category", "link_to": "Employee Tax Exemption Category"})
- hrms/patches/v14_0/update_repay_from_salary_and_payroll_payable_account_fields.py:6 — frappe.db.set_value("Custom Field", {"name": "Loan Repayment-repay_from_salary"}, "fetch_if_empty", 1)
- hrms/hr/doctype/job_requisition/job_requisition.py:45 — frappe.db.set_value("Job Opening", job_opening, {"job_requisition": self.name, "vacancies": self.no_of_positions})
- hrms/payroll/doctype/salary_slip/test_salary_slip.py (multiple) — frappe.db.set_value("Employee", emp_id, {"relieving_date": None, "status": "Active"})
Conclusion: no change required for the patches.txt entry; it follows established usage in the codebase.
74296f8
to
1e6ccaa
Compare
(cherry picked from commit 9d2083c) # Conflicts: # hrms/patches.txt # hrms/payroll/workspace/tax_&_benefits/tax_&_benefits.json
(cherry picked from commit 9d2083c) # Conflicts: # hrms/patches.txt # hrms/payroll/workspace/tax_&_benefits/tax_&_benefits.json
…3472 fix: update employee tax exemption category link in workspace (backport #3472)
…3472 fix: update employee tax exemption category link in workspace (backport #3472)
## [14.37.10](v14.37.9...v14.37.10) (2025-08-20) ### Bug Fixes * add missing translation function ([#3476](#3476)) ([#3479](#3479)) ([f0f1499](f0f1499)) * convert using cint ([8cac99c](8cac99c)) * Fixed typo in hiring vs attrition chart ([#3473](#3473)) ([#3477](#3477)) ([86030b4](86030b4)) * show attendance summary after joining date ([b0c9907](b0c9907)) * update employee tax exemption category link in workspace ([#3472](#3472)) ([4c1213b](4c1213b)) * validate joined_in_current_period in query ([503b4da](503b4da))
## [15.49.1](v15.49.0...v15.49.1) (2025-08-20) ### Bug Fixes * add missing translation function ([#3476](#3476)) ([#3480](#3480)) ([1181b90](1181b90)) * add patch ([f72115f](f72115f)) * allow employee advance to be in a different currency than advance account currency ([d86b009](d86b009)) * convert using cint ([653bf43](653bf43)) * cost center add in gl when loan repay from payroll ([d3e0ffc](d3e0ffc)) * do not get value for link fields ([ecf49e6](ecf49e6)) * fetch correct allocated, expired, and carried forward leaves ([0da619f](0da619f)) * Fixed typo in hiring vs attrition chart ([#3473](#3473)) ([#3478](#3478)) ([f2772f3](f2772f3)) * get expired leaves within the allocation period ([7248e89](7248e89)) * leave balance when allocations are manually expired ([7f0dfa5](7f0dfa5)) * round with field precision ([0b4641f](0b4641f)) * show attendance summary after joining date ([8737aef](8737aef)) * throw validation error while updating employee advance status if account type is missing ([8916a25](8916a25)) * update amount on advance payment ledger entry ([093713e](093713e)) * update employee tax exemption category link in workspace ([#3472](#3472)) ([195ec5a](195ec5a)) * validate joined_in_current_period in query ([2ab6a1b](2ab6a1b))
Issue: Incorrect
Employee Tax Exemption Category
link in Tax & Benefits workspaceref: 46503
Backport needed for v15 & v14
Summary by CodeRabbit
Style
Chores