-
Notifications
You must be signed in to change notification settings - Fork 4
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
Filter not activated LPAs 2.0 #1064
Filter not activated LPAs 2.0 #1064
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1064 +/- ##
============================================
+ Coverage 91.50% 91.51% +0.01%
- Complexity 1372 1374 +2
============================================
Files 222 222
Lines 4190 4198 +8
Branches 22 22
============================================
+ Hits 3834 3842 +8
Misses 356 356
Continue to review full report at Codecov.
|
Should these have been raised before this change?
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.
Code looks fine, I have a concern with implementation though in that altering a methods return based on boolean parameters is generally seen as bad practice as it can be avoided by restructuring the code itself.
The getAllForUser method is called in 2 locations so, although I appreciate the simplicity of this change, wanting to avoid wider scale changes is not a particularly relevant concern.
Happy to discuss.
That's reasonable, I'll change it into two different methods |
This PR is helped by ministryofjustice/opg-data-lpa#51 which will add a requested LPA to the users LPAs which will then either be shown on the dashboard or not depending on the state of this ticket |
Purpose
Change implementation of getUserLpas so only activated LPAs are recieved. This will then stop LPAs from being visible on the dashboard if they are not activated
Fixes UML-1697
Approach
Changing this getUserLPAs method means that we are changing functionality as little as possible. Everywhere that gets LPAs are most likely using this method and will now mirror the existing functionality.
Checklist
[ ] I have added relevant logging with appropriate levels to my code[ ] I have updated documentation (Confluence/GitHub wiki/tech debt doc) where relevant[ ] I have added welsh translation tags and updated translation files[ ] I have run an accessibility tool on any pages I have made changes to and fixed any issues found[ ] The product team have tested these changes