Skip to content

Fix Healthcare Service Unit Type rate edit failing due to wrong item code mapping#1015

Merged
Sajinsr merged 1 commit into
earthians:developfrom
md-umair-21:service-unit-type
Jun 7, 2026
Merged

Fix Healthcare Service Unit Type rate edit failing due to wrong item code mapping#1015
Sajinsr merged 1 commit into
earthians:developfrom
md-umair-21:service-unit-type

Conversation

@md-umair-21
Copy link
Copy Markdown
Contributor

Issue:-
Editing the rate of an existing billable Healthcare Service Unit Type was throwing an error like
Could not find Item Code: Semi PVT Mezzanine Floor.

image

The issue was caused by the item_code field fetching its value from item.item_name.
Because of this, the document was using the Item Name instead of the actual Item Code during save/update flows.

When the rate was edited, the system attempted to resolve the item using a display name, which caused the item code lookup to fail.

Fix Applied
Changed fetch_from from item.item_name to item.item_code.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f0d42ebe-0b79-4297-bc33-08154a0da2da

📥 Commits

Reviewing files that changed from the base of the PR and between 6402966 and 676ff95.

📒 Files selected for processing (1)
  • healthcare/healthcare/doctype/healthcare_service_unit_type/healthcare_service_unit_type.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • healthcare/healthcare/doctype/healthcare_service_unit_type/healthcare_service_unit_type.json

Walkthrough

The PR updates the Healthcare Service Unit Type DocType configuration by changing the item_code field's fetch_from mapping to retrieve the Item's code (item.item_code) instead of the Item's name (item.item_name).

Possibly related PRs

  • earthians/marley#1007: Modifies the same Healthcare Service Unit Type DocType configuration with changes to billable, hours, and field ordering settings.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing a Healthcare Service Unit Type rate edit issue caused by incorrect item code mapping.
Description check ✅ Passed The description clearly explains the issue, root cause, and the applied fix, directly relating to the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sajinsr Sajinsr force-pushed the service-unit-type branch from 6402966 to 676ff95 Compare June 7, 2026 15:22
@Sajinsr Sajinsr merged commit 96ccbf8 into earthians:develop Jun 7, 2026
9 checks passed
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