Skip to content

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

Merged
merged 2 commits into from
Aug 18, 2025

Conversation

venkat102
Copy link
Collaborator

@venkat102 venkat102 commented Aug 15, 2025

Issue: Incorrect Employee Tax Exemption Category link in Tax & Benefits workspace
ref: 46503

imagefaf820

Backport needed for v15 & v14

Summary by CodeRabbit

  • Style

    • Renamed workspace link from “Employee Tax Exemption Declaration Category” to “Employee Tax Exemption Category” and updated its destination for consistent navigation.
  • Chores

    • Normalized patches file line ending (formatting only; no functional changes).

Copy link

coderabbitai bot commented Aug 15, 2025

Walkthrough

In 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 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 1322c36 and 1e6ccaa.

📒 Files selected for processing (2)
  • hrms/patches.txt (1 hunks)
  • hrms/payroll/workspace/tax_&_benefits/tax_&_benefits.json (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • hrms/patches.txt
🚧 Files skipped from review as they are similar to previous changes (1)
  • hrms/payroll/workspace/tax_&benefits/tax&_benefits.json
⏰ 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 (1)
  • GitHub Check: Python Unit Tests (2)
  • GitHub Check: Summary

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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_link

Example 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 8c31634 and 572e02a.

📒 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 — LGTM

Changing 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 entry

This 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 repo

Found 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.

@venkat102 venkat102 requested a review from asmitahase as a code owner August 18, 2025 09:37
@ruchamahabal ruchamahabal merged commit 9d2083c into frappe:develop Aug 18, 2025
8 checks passed
mergify bot pushed a commit that referenced this pull request Aug 18, 2025
(cherry picked from commit 9d2083c)

# Conflicts:
#	hrms/patches.txt
#	hrms/payroll/workspace/tax_&_benefits/tax_&_benefits.json
mergify bot pushed a commit that referenced this pull request Aug 18, 2025
(cherry picked from commit 9d2083c)

# Conflicts:
#	hrms/patches.txt
#	hrms/payroll/workspace/tax_&_benefits/tax_&_benefits.json
asmitahase added a commit that referenced this pull request Aug 19, 2025
…3472

fix: update employee tax exemption category link in workspace (backport #3472)
asmitahase added a commit that referenced this pull request Aug 19, 2025
…3472

fix: update employee tax exemption category link in workspace (backport #3472)
frappe-pr-bot pushed a commit that referenced this pull request Aug 20, 2025
## [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))
frappe-pr-bot pushed a commit that referenced this pull request Aug 20, 2025
## [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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants