Bug 38045

Summary: Patron messaging preference table says it is loading but never does if fieldset is collapsed
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: PatronsAssignee: Nick Clemens (kidclamp) <nick>
Status: RESOLVED WORKSFORME QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, gmcharlt, kyle.m.hall, nick
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 38045: Don't show loading message when hiding messaging preferences

Description Lucas Gass (lukeg) 2024-09-30 21:11:27 UTC
To recreate:
1. Add Patron messaging preferences to `CollapseFieldsPatronAddForm` system preference.
2. Go to a patron record, new or existing.
3. Scroll down to the message pref section and see `Loading new messaging defaults `.
4. It never loads

If the fieldset is collapsed we shouldn't load the table but we also shouldn't show a message saying `Loading new messaging defaults...`
Comment 1 Phil Ringnalda 2025-02-06 01:34:37 UTC
*** Bug 39047 has been marked as a duplicate of this bug. ***
Comment 2 Nick Clemens (kidclamp) 2025-02-14 14:53:21 UTC
Created attachment 178100 [details] [review]
Bug 38045: Don't show loading message when hiding messaging preferences

This spinner is meant to show when the category has changed and we are
loading the new defaults for a category.
There is no reason to toggle visibility when the form is initially hidden

To test:
 1 - Mark 'Patron messaging preference' in CollapseFieldsPatronAddForm
 2 - Edit an existing patron or add a new one
 3 - Note the spinner 'Loading new messaging preferences'
 4 - Click the toggle to hide/show messaging preferences a few times
 5 - Spinner disappears and table can be shown
 6 - Apply patch
 7 - Edit existing or add new patron
 8 - No spinner
 9 - Change patorn category and say yes to laod new prefs
10 - Note spinner shows and then hides very fast
     It is easier to see if you collapse all the fields between category and messaing prefs
11 - Confirm messaging prefs can be edited/saved correctly still
Comment 3 David Nind 2025-02-14 19:21:25 UTC
I'm getting the sha1/fake ancestor error when trying to apply the patch 8-(...

git bz apply 38045

Bug 38045 - Patron messaging preference table says it is loading but never does if fieldset is collapsed

178100 - Bug 38045: Don't show loading message when hiding messaging preferences

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 38045: Don't show loading message when hiding messaging preferences
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt).
error: could not build fake ancestor
Patch failed at 0001 Bug 38045: Don't show loading message when hiding messaging preferences
Comment 4 Nick Clemens (kidclamp) 2025-03-31 09:57:57 UTC
Maybe bug 39189 fixed this, but  I can no longer recreate