Bug 35493 - Housebound roles show as a collapsed field option when checked in CollapseFieldsPatronAddForm, even if housebound is off
Summary: Housebound roles show as a collapsed field option when checked in CollapseFie...
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-05 17:06 UTC by Lucas Gass
Modified: 2024-01-04 20:59 UTC (History)
5 users (show)

See Also:
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


Attachments
Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on (1.88 KB, patch)
2023-12-05 17:11 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on (1.92 KB, patch)
2023-12-05 19:54 UTC, David Nind
Details | Diff | Splinter Review
Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on (1.99 KB, patch)
2023-12-19 15:01 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 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 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 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 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 2024-01-04 20:59:22 UTC
Backported to 23.05.x for upcoming 23.05.08