Bug 35493

Summary: Housebound roles show as a collapsed field option when checked in CollapseFieldsPatronAddForm, even if housebound is off
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: PatronsAssignee: Lucas Gass (lukeg) <lucas>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, fridolin.somers, gmcharlt, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.02,23.05.08
Circulation function:
Attachments: Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on
Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on
Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on

Description Lucas Gass (lukeg) 2023-12-05 17:06:22 UTC
To recreate:
1.  HouseboundModule - disabled
2. CollapseFieldsPatronAddForm, add 'Housebound roles'
3. Edit/create a patron.
4. Notice the useless Housebound roles link at the top of the page
Comment 1 Lucas Gass (lukeg) 2023-12-05 17:11:28 UTC
Created attachment 159600 [details] [review]
Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on

To test:
1. HouseboundModule - disabled
2. CollapseFieldsPatronAddForm, add 'Housebound roles'
3. Edit/create a patron.
4. Notice the useless Housebound roles link at the top of the page
5. APPLY PATCH
6. Try 1 - 3 again, this time no Housebound roles at the top ( Show collapsed fields )
7. Turn on HouseboundModule and make sure it now shows
Comment 2 David Nind 2023-12-05 19:54:53 UTC
Created attachment 159608 [details] [review]
Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on

To test:
1. HouseboundModule - disabled
2. CollapseFieldsPatronAddForm, add 'Housebound roles'
3. Edit/create a patron.
4. Notice the useless Housebound roles link at the top of the page
5. APPLY PATCH
6. Try 1 - 3 again, this time no Housebound roles at the top ( Show collapsed fields )
7. Turn on HouseboundModule and make sure it now shows

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2023-12-05 20:18:23 UTC
I've signed off, as it does what it says in the test plan.

Should the rules be in the system preference? That is: if an option for CollapseFieldsPatronAddForm is "not valid", for example like housebound roles that requires HouseboundModule, then it is greyed out/not able to be selected?
Comment 4 Martin Renvoize (ashimema) 2023-12-19 15:01:28 UTC
Created attachment 160009 [details] [review]
Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on

To test:
1. HouseboundModule - disabled
2. CollapseFieldsPatronAddForm, add 'Housebound roles'
3. Edit/create a patron.
4. Notice the useless Housebound roles link at the top of the page
5. APPLY PATCH
6. Try 1 - 3 again, this time no Housebound roles at the top ( Show collapsed fields )
7. Turn on HouseboundModule and make sure it now shows

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize (ashimema) 2023-12-19 15:02:40 UTC
Trivial patch working as designed. No regressions, QA scripts happy.

Passing QA

Whilst I agree with David, it would be nice if the sysprefs themselves were a bit more reactive to the value's of prefs they depend on, there's no real avenue to doing this as they currently stand.
Comment 6 Katrin Fischer 2023-12-20 14:15:12 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 7 Fridolin Somers 2024-01-03 15:32:50 UTC
Pushed to 23.11.x for 23.11.02
Comment 8 Lucas Gass (lukeg) 2024-01-04 20:59:22 UTC
Backported to 23.05.x for upcoming 23.05.08