-
Couldn't load subscription status.
- Fork 4
Fix bug: bulk edit states button label is blank when all selected states are the same #1543
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
base: develop
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR fixes a bug where the bulk edit state button displays a blank label when all selected items share the same state. The issue was caused by passing stateId directly from the model instead of extracting the id property from the nested state object.
Key Changes:
- Added
getutility import from underscore - Updated state ID extraction to use
get(this.model.get('state'), 'id')instead ofthis.model.get('stateId')
WalkthroughReplaced direct stateId property access with a safe getter reading the id from a nested state object in two bulk-edit view components; added test assertions in Cypress integration tests to verify initial and modal UI values for bulk-edit flows and multiple-item edits. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.js📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{hbs,js}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧬 Code graph analysis (1)test/integration/patients/worklist/bulk-edit.js (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). (1)
🔇 Additional comments (2)
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 |
RoundingWell Care Ops Frontend
|
||||||||||||||||||||||||||||
| Project |
RoundingWell Care Ops Frontend
|
| Branch Review |
bulk-state-btn
|
| Run status |
|
| Run duration | 02m 08s |
| Commit |
|
| Committer | Nick Major |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
334
|
| View all changes introduced in this branch ↗︎ | |
Pull Request Test Coverage Report for Build d439b1e2-a32f-4569-b625-092fce74ac6bDetails
💛 - Coveralls |
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.
Feels like there should be a test for this or no?
|
Wasn't sure about testing these. Only the So we should probably test all of the other ones too. Not just the state button. Which could be a pain... but I guess we could just add an extra action/flow to the list in the test, select just that one, and test the buttons. |
…actions/flows have the same state
3ba3924 to
80db12c
Compare
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.
Easier than I originally thought. To verify the button labels are shown correctly when all states, owners, due dates, etc. are the same.
Shortcut Story ID: [sc-64560]
Summary by CodeRabbit
Bug Fixes
Tests