19804-missing-validation-when-saving-without-adding-procedures#19847
19804-missing-validation-when-saving-without-adding-procedures#19847denuwanhendalage wants to merge 2 commits intodevelopmentfrom
Conversation
…oller Signed-off-by: denuwanhendalage <shashankadenuwanb@gmail.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 6 minutes and 22 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdded validation to prevent saving procedures with null or blank names and codes, corrected success message logic to distinguish between create ("Saved") and update ("Updated") operations. Also configured UI notification timeout and expanded AJAX update targets. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/main/java/com/divudi/bean/clinical/ProcedureController.java`:
- Around line 140-142: In ProcedureController, the null-check for current should
stop execution after reporting the error: when current == null, call
JsfUtil.addErrorMessage("Nothing to save") and immediately return from the
method to avoid the later getCurrent() auto-creating a new ClinicalEntity and
triggering spurious name/code validation errors; modify the method containing
the current null-check (in class ProcedureController) to add a return right
after the JsfUtil.addErrorMessage call.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b771498e-239c-4a37-9df7-679c40d8e590
📒 Files selected for processing (2)
src/main/java/com/divudi/bean/clinical/ProcedureController.javasrc/main/webapp/emr/admin/procedures.xhtml
src/main/java/com/divudi/bean/clinical/ProcedureController.java
Outdated
Show resolved
Hide resolved
Signed-off-by: denuwanhendalage <shashankadenuwanb@gmail.com>
changes
Summary by CodeRabbit